diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/biddingManagement/biaoqianlixiang/service/impl/XzdBidPreProjectServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/biddingManagement/biaoqianlixiang/service/impl/XzdBidPreProjectServiceImpl.java index 4a443e17..0735e128 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/biddingManagement/biaoqianlixiang/service/impl/XzdBidPreProjectServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/biddingManagement/biaoqianlixiang/service/impl/XzdBidPreProjectServiceImpl.java @@ -179,6 +179,7 @@ public class XzdBidPreProjectServiceImpl extends ServiceImpl objectObjectHashMap = new HashMap<>(); objectObjectHashMap.put("bid_pre_project_id",id); iXzdBqlxProjectInfoService.removeByMap(objectObjectHashMap); diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/biddingManagement/earnestMoney/domain/vo/XzdBidDepositPaymentVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/biddingManagement/earnestMoney/domain/vo/XzdBidDepositPaymentVo.java index 06bd6914..e19996b7 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/biddingManagement/earnestMoney/domain/vo/XzdBidDepositPaymentVo.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/biddingManagement/earnestMoney/domain/vo/XzdBidDepositPaymentVo.java @@ -187,6 +187,12 @@ public class XzdBidDepositPaymentVo implements Serializable { @Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "createBy") private String createName; + + private Long createDept; + + @Translation(type = TransConstant.DEPT_ID_TO_NAME, mapper = "createDept") + private String createDeptName; + /** * 创建时间 */ diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/biddingManagement/earnestMoneyWithdraw/domain/XzdBidDepositRecovery.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/biddingManagement/earnestMoneyWithdraw/domain/XzdBidDepositRecovery.java index b6a351b6..32baa78e 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/biddingManagement/earnestMoneyWithdraw/domain/XzdBidDepositRecovery.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/biddingManagement/earnestMoneyWithdraw/domain/XzdBidDepositRecovery.java @@ -4,6 +4,8 @@ import org.dromara.common.mybatis.core.domain.BaseEntity; import com.baomidou.mybatisplus.annotation.*; import lombok.Data; import lombok.EqualsAndHashCode; + +import java.time.LocalDateTime; import java.util.Date; import com.fasterxml.jackson.annotation.JsonFormat; @@ -37,7 +39,7 @@ public class XzdBidDepositRecovery extends BaseEntity { /** * 单据日期 */ - private Date documentDate; + private LocalDateTime documentDate; /** * 项目名称 @@ -87,7 +89,7 @@ public class XzdBidDepositRecovery extends BaseEntity { /** * 收回日期 */ - private Date recoveryDate; + private LocalDateTime recoveryDate; /** * 保证金状态 @@ -112,12 +114,14 @@ public class XzdBidDepositRecovery extends BaseEntity { /** * 支付截止时间 */ - private Date paymentDeadline; + private LocalDateTime paymentDeadline; /** - * 收款单位 + * 收款单位(保证金信息) */ - private String receivingUnit; + private Long receivingUnit; + + /** * 保证金收款账户名称 @@ -125,12 +129,12 @@ public class XzdBidDepositRecovery extends BaseEntity { private String depositReceivingAccountName; /** - * 收款账户银行 + * 收款账户银行(保证金信息) */ private String receivingBank; /** - * 收款账户账号 + * 收款账户账号(保证金信息) */ private String receivingBankAccount; @@ -147,7 +151,7 @@ public class XzdBidDepositRecovery extends BaseEntity { /** * 申请日期 */ - private Date applicationDate; + private LocalDateTime applicationDate; /** * 标题 @@ -170,18 +174,25 @@ public class XzdBidDepositRecovery extends BaseEntity { private String auditStatus; - /** - * 收款账户银行 - */ - private Long payeeBank; - /** - * 收款账户名称 - */ - private Long payeeName; + /** * 收款单位(供应商信息) */ private Long payeeId; + /** + * 收款账户银行 (供应商信息) + */ + private String payeeBank; + /** + * 收款账户名称(供应商信息) + */ + private String payeeName; + + /** + * 收款账号 + */ + private String gatheringNumber; + /** * 缴纳id */ diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/biddingManagement/earnestMoneyWithdraw/domain/bo/XzdBidDepositRecoveryBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/biddingManagement/earnestMoneyWithdraw/domain/bo/XzdBidDepositRecoveryBo.java index 1c4f993d..f773c85f 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/biddingManagement/earnestMoneyWithdraw/domain/bo/XzdBidDepositRecoveryBo.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/biddingManagement/earnestMoneyWithdraw/domain/bo/XzdBidDepositRecoveryBo.java @@ -7,6 +7,8 @@ import io.github.linpeilie.annotations.AutoMapper; import lombok.Data; import lombok.EqualsAndHashCode; import jakarta.validation.constraints.*; + +import java.time.LocalDateTime; import java.util.Date; import com.fasterxml.jackson.annotation.JsonFormat; import org.dromara.xzd.biddingManagement.earnestMoneyWithdraw.domain.XzdBidDepositRecovery; @@ -25,13 +27,11 @@ public class XzdBidDepositRecoveryBo extends BaseEntity { /** * 主键ID */ - @NotNull(message = "主键ID不能为空", groups = { EditGroup.class }) private Long id; /** * 单据编码 */ - @NotBlank(message = "单据编码不能为空", groups = { AddGroup.class, EditGroup.class }) private String documentCode; /** @@ -64,13 +64,11 @@ public class XzdBidDepositRecoveryBo extends BaseEntity { /** * 收回金额 */ - @NotNull(message = "收回金额不能为空", groups = { AddGroup.class, EditGroup.class }) private Long recoveryAmount; /** * 收回金额大写 */ - @NotBlank(message = "收回金额大写不能为空", groups = { AddGroup.class, EditGroup.class }) private String recoveryAmountCapital; /** @@ -91,7 +89,7 @@ public class XzdBidDepositRecoveryBo extends BaseEntity { /** * 收回日期 */ - private Date recoveryDate; + private LocalDateTime recoveryDate; /** * 保证金状态 @@ -116,7 +114,7 @@ public class XzdBidDepositRecoveryBo extends BaseEntity { /** * 支付截止时间 */ - private Date paymentDeadline; + private LocalDateTime paymentDeadline; /** * 收款单位 @@ -151,7 +149,7 @@ public class XzdBidDepositRecoveryBo extends BaseEntity { /** * 申请日期 */ - private Date applicationDate; + private LocalDateTime applicationDate; /** * 标题 @@ -178,23 +176,24 @@ public class XzdBidDepositRecoveryBo extends BaseEntity { */ private Integer gatheringNumber; - /** - * 收款账户银行 - */ - private Long payeeBank; - /** - * 收款账户名称 - */ - private Long payeeName; /** * 收款单位(供应商信息) */ private Long payeeId; + /** + * 收款账户银行 (供应商信息) + */ + private String payeeBank; + /** + * 收款账户名称(供应商信息) + */ + private String payeeName; /** * 缴纳id */ private Long paymentId; + /** * 汇款方式 */ diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/biddingManagement/earnestMoneyWithdraw/domain/vo/XzdBidDepositRecoveryVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/biddingManagement/earnestMoneyWithdraw/domain/vo/XzdBidDepositRecoveryVo.java index f64a7eb0..32b357a9 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/biddingManagement/earnestMoneyWithdraw/domain/vo/XzdBidDepositRecoveryVo.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/biddingManagement/earnestMoneyWithdraw/domain/vo/XzdBidDepositRecoveryVo.java @@ -1,5 +1,6 @@ package org.dromara.xzd.biddingManagement.earnestMoneyWithdraw.domain.vo; +import java.time.LocalDateTime; import java.util.Date; import com.baomidou.mybatisplus.annotation.FieldFill; @@ -51,7 +52,7 @@ public class XzdBidDepositRecoveryVo implements Serializable { * 单据日期 */ @ExcelProperty(value = "单据日期") - private Date documentDate; + private LocalDateTime documentDate; /** * 项目名称 @@ -111,7 +112,7 @@ public class XzdBidDepositRecoveryVo implements Serializable { * 收回日期 */ @ExcelProperty(value = "收回日期") - private Date recoveryDate; + private LocalDateTime recoveryDate; /** * 保证金状态 @@ -141,7 +142,7 @@ public class XzdBidDepositRecoveryVo implements Serializable { * 支付截止时间 */ @ExcelProperty(value = "支付截止时间") - private Date paymentDeadline; + private LocalDateTime paymentDeadline; /** * 收款单位 @@ -183,7 +184,7 @@ public class XzdBidDepositRecoveryVo implements Serializable { * 申请日期 */ @ExcelProperty(value = "申请日期") - private Date applicationDate; + private LocalDateTime applicationDate; /** * 标题 @@ -218,20 +219,27 @@ public class XzdBidDepositRecoveryVo implements Serializable { * 创建时间 */ @TableField(fill = FieldFill.INSERT) - private Date createTime; + private LocalDateTime createTime; /** - * 收款账户银行 + * 收款账户银行 (供应商信息) */ - private Long payeeBank; + private String payeeBank; + + /** - * 收款账户名称 + * 收款账号 */ - private Long payeeName; + private String gatheringNumber; /** * 收款单位(供应商信息) */ private Long payeeId; + + /** + * 收款账户名称(供应商信息) + */ + private String payeeName; /** * 缴纳id */ @@ -245,4 +253,10 @@ public class XzdBidDepositRecoveryVo implements Serializable { private String methodOfRemittance; + /** + * 项目编码 + */ + private String xmbm; + + } diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/biddingManagement/postAnalysis/domain/vo/XzdPostBidAnalysisVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/biddingManagement/postAnalysis/domain/vo/XzdPostBidAnalysisVo.java index d8b6ab9b..ef10f797 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/biddingManagement/postAnalysis/domain/vo/XzdPostBidAnalysisVo.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/biddingManagement/postAnalysis/domain/vo/XzdPostBidAnalysisVo.java @@ -152,4 +152,6 @@ public class XzdPostBidAnalysisVo implements Serializable { private String auditStatus; + + } diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/caigoucontractTermination/controller/XzdPurchaseContractSuspendController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/caigoucontractTermination/controller/XzdPurchaseContractSuspendController.java new file mode 100644 index 00000000..f72c3736 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/caigoucontractTermination/controller/XzdPurchaseContractSuspendController.java @@ -0,0 +1,105 @@ +package org.dromara.xzd.contractManagement.caigoucontractTermination.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.contractManagement.caigoucontractTermination.domain.vo.XzdPurchaseContractSuspendVo; +import org.dromara.xzd.contractManagement.caigoucontractTermination.domain.bo.XzdPurchaseContractSuspendBo; +import org.dromara.xzd.contractManagement.caigoucontractTermination.service.IXzdPurchaseContractSuspendService; +import org.dromara.common.mybatis.core.page.TableDataInfo; + +/** + * 采购合同终止 + * + * @author Lion Li + * @date 2025-10-13 + */ +@Validated +@RequiredArgsConstructor +@RestController +@RequestMapping("/contractTermination/purchaseContractSuspend") +public class XzdPurchaseContractSuspendController extends BaseController { + + private final IXzdPurchaseContractSuspendService xzdPurchaseContractSuspendService; + + /** + * 查询采购合同终止列表 + */ + @SaCheckPermission("contractTermination:purchaseContractSuspend:list") + @GetMapping("/list") + public TableDataInfo list(XzdPurchaseContractSuspendBo bo, PageQuery pageQuery) { + return xzdPurchaseContractSuspendService.queryPageList(bo, pageQuery); + } + + /** + * 导出采购合同终止列表 + */ + @SaCheckPermission("contractTermination:purchaseContractSuspend:export") + @Log(title = "采购合同终止", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(XzdPurchaseContractSuspendBo bo, HttpServletResponse response) { + List list = xzdPurchaseContractSuspendService.queryList(bo); + ExcelUtil.exportExcel(list, "采购合同终止", XzdPurchaseContractSuspendVo.class, response); + } + + /** + * 获取采购合同终止详细信息 + * + * @param id 主键 + */ + @SaCheckPermission("contractTermination:purchaseContractSuspend:query") + @GetMapping("/{id}") + public R getInfo(@NotNull(message = "主键不能为空") + @PathVariable Long id) { + return R.ok(xzdPurchaseContractSuspendService.queryById(id)); + } + + /** + * 新增采购合同终止 + */ + @SaCheckPermission("contractTermination:purchaseContractSuspend:add") + @Log(title = "采购合同终止", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping() + public R add(@Validated(AddGroup.class) @RequestBody XzdPurchaseContractSuspendBo bo) { + return toAjax(xzdPurchaseContractSuspendService.insertByBo(bo)); + } + + /** + * 修改采购合同终止 + */ + @SaCheckPermission("contractTermination:purchaseContractSuspend:edit") + @Log(title = "采购合同终止", businessType = BusinessType.UPDATE) + @RepeatSubmit() + @PutMapping() + public R edit(@Validated(EditGroup.class) @RequestBody XzdPurchaseContractSuspendBo bo) { + return toAjax(xzdPurchaseContractSuspendService.updateByBo(bo)); + } + + /** + * 删除采购合同终止 + * + * @param ids 主键串 + */ + @SaCheckPermission("contractTermination:purchaseContractSuspend:remove") + @Log(title = "采购合同终止", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public R remove(@NotEmpty(message = "主键不能为空") + @PathVariable Long[] ids) { + return toAjax(xzdPurchaseContractSuspendService.deleteWithValidByIds(List.of(ids), true)); + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/caigoucontractTermination/domain/XzdPurchaseContractSuspend.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/caigoucontractTermination/domain/XzdPurchaseContractSuspend.java new file mode 100644 index 00000000..7ac9b8bc --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/caigoucontractTermination/domain/XzdPurchaseContractSuspend.java @@ -0,0 +1,134 @@ +package org.dromara.xzd.contractManagement.caigoucontractTermination.domain; + +import org.dromara.common.mybatis.core.domain.BaseEntity; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.time.LocalDate; +import java.util.Date; + +import java.io.Serial; + +/** + * 采购合同终止对象 xzd_purchase_contract_suspend + * + * @author Lion Li + * @date 2025-10-13 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("xzd_purchase_contract_suspend") +public class XzdPurchaseContractSuspend extends BaseEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键ID + */ + @TableId(value = "id") + private Long id; + + /** + * 采购合同信息ID(合同编码) + */ + private Long contractInformationId; + + /** + * 单据编码 + */ + private String receiptsCode; + + /** + * 标题 + */ + private String title; + + /** + * 单据日期 + */ + private LocalDate documentDate; + + /** + * 合同名称 + */ + private String contractName; + + /** + * 终止日期 + */ + private LocalDate terminationDate; + + /** + * 项目名称 + */ + private String project; + + /** + * 乙方单位 + */ + private Long artyBUnit; + + /** + * 甲方单位 + */ + private Long partyAUnit; + + /** + * 终止原因 + */ + private String terminationCause; + + /** + * 项目大类 + */ + private String projectCategory; + + /** + * 项目类型 + */ + private String projectType; + + /** + * 备注说明 + */ + private String remarks; + + /** + * 合同金额 + */ + private Long contractAmount; + + /** + * 累计结算金额 + */ + private Long cumulativeSettlementAmount; + + /** + * 累计付款金额 + */ + private Long cumulativePaymentAmount; + + /** + * 是否用印:1-是,0-否 + */ + private Long isSeal; + + /** + * 文件ID + */ + private String fileId; + + /** + * 备注 + */ + private String remark; + + /** + * 审核状态 + */ + private String auditStatus; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/caigoucontractTermination/domain/bo/XzdPurchaseContractSuspendBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/caigoucontractTermination/domain/bo/XzdPurchaseContractSuspendBo.java new file mode 100644 index 00000000..48737ef0 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/caigoucontractTermination/domain/bo/XzdPurchaseContractSuspendBo.java @@ -0,0 +1,132 @@ +package org.dromara.xzd.contractManagement.caigoucontractTermination.domain.bo; + +import org.dromara.xzd.contractManagement.caigoucontractTermination.domain.XzdPurchaseContractSuspend; +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.time.LocalDate; +import java.util.Date; + +/** + * 采购合同终止业务对象 xzd_purchase_contract_suspend + * + * @author Lion Li + * @date 2025-10-13 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = XzdPurchaseContractSuspend.class, reverseConvertGenerate = false) +public class XzdPurchaseContractSuspendBo extends BaseEntity { + + /** + * 主键ID + */ + private Long id; + + /** + * 采购合同信息ID(合同编码) + */ + private Long contractInformationId; + + /** + * 单据编码 + */ + private String receiptsCode; + + /** + * 标题 + */ + private String title; + + /** + * 单据日期 + */ + private LocalDate documentDate; + + /** + * 合同名称 + */ + private String contractName; + + /** + * 终止日期 + */ + private Date terminationDate; + + /** + * 项目名称 + */ + private String project; + + /** + * 乙方单位 + */ + private Long artyBUnit; + + /** + * 甲方单位 + */ + private Long partyAUnit; + + /** + * 终止原因 + */ + private String terminationCause; + + /** + * 项目大类 + */ + private String projectCategory; + + /** + * 项目类型 + */ + private String projectType; + + /** + * 备注说明 + */ + private String remarks; + + /** + * 合同金额 + */ + private Long contractAmount; + + /** + * 累计结算金额 + */ + private Long cumulativeSettlementAmount; + + /** + * 累计付款金额 + */ + private Long cumulativePaymentAmount; + + /** + * 是否用印:1-是,0-否 + */ + private Long isSeal; + + /** + * 文件ID + */ + private String fileId; + + /** + * 备注 + */ + private String remark; + + /** + * 审核状态 + */ + private String auditStatus; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/caigoucontractTermination/domain/vo/XzdPurchaseContractSuspendVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/caigoucontractTermination/domain/vo/XzdPurchaseContractSuspendVo.java new file mode 100644 index 00000000..981c55a4 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/caigoucontractTermination/domain/vo/XzdPurchaseContractSuspendVo.java @@ -0,0 +1,160 @@ +package org.dromara.xzd.contractManagement.caigoucontractTermination.domain.vo; + +import java.time.LocalDate; +import java.util.Date; + +import org.dromara.xzd.contractManagement.caigoucontractTermination.domain.XzdPurchaseContractSuspend; +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; + + +/** + * 采购合同终止视图对象 xzd_purchase_contract_suspend + * + * @author Lion Li + * @date 2025-10-13 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = XzdPurchaseContractSuspend.class) +public class XzdPurchaseContractSuspendVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键ID + */ + @ExcelProperty(value = "主键ID") + private Long id; + + /** + * 采购合同信息ID(合同编码) + */ + @ExcelProperty(value = "采购合同信息ID", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "合=同编码") + private Long contractInformationId; + + /** + * 单据编码 + */ + @ExcelProperty(value = "单据编码") + private String receiptsCode; + + /** + * 标题 + */ + @ExcelProperty(value = "标题") + private String title; + + /** + * 单据日期 + */ + @ExcelProperty(value = "单据日期") + private LocalDate documentDate; + + /** + * 合同名称 + */ + @ExcelProperty(value = "合同名称") + private String contractName; + + /** + * 终止日期 + */ + @ExcelProperty(value = "终止日期") + private Date terminationDate; + + /** + * 项目名称 + */ + @ExcelProperty(value = "项目名称") + private String project; + + /** + * 乙方单位 + */ + @ExcelProperty(value = "乙方单位") + private Long artyBUnit; + + /** + * 甲方单位 + */ + @ExcelProperty(value = "甲方单位") + private Long partyAUnit; + + /** + * 终止原因 + */ + @ExcelProperty(value = "终止原因") + private String terminationCause; + + /** + * 项目大类 + */ + @ExcelProperty(value = "项目大类") + private String projectCategory; + + /** + * 项目类型 + */ + @ExcelProperty(value = "项目类型") + private String projectType; + + /** + * 备注说明 + */ + @ExcelProperty(value = "备注说明") + private String remarks; + + /** + * 合同金额 + */ + @ExcelProperty(value = "合同金额") + private Long contractAmount; + + /** + * 累计结算金额 + */ + @ExcelProperty(value = "累计结算金额") + private Long cumulativeSettlementAmount; + + /** + * 累计付款金额 + */ + @ExcelProperty(value = "累计付款金额") + private Long cumulativePaymentAmount; + + /** + * 是否用印:1-是,0-否 + */ + @ExcelProperty(value = "是否用印:1-是,0-否") + private Long isSeal; + + /** + * 文件ID + */ + @ExcelProperty(value = "文件ID") + private String fileId; + + /** + * 备注 + */ + @ExcelProperty(value = "备注") + private String remark; + + /** + * 审核状态 + */ + @ExcelProperty(value = "审核状态") + private String auditStatus; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/caigoucontractTermination/mapper/XzdPurchaseContractSuspendMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/caigoucontractTermination/mapper/XzdPurchaseContractSuspendMapper.java new file mode 100644 index 00000000..39083a7f --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/caigoucontractTermination/mapper/XzdPurchaseContractSuspendMapper.java @@ -0,0 +1,15 @@ +package org.dromara.xzd.contractManagement.caigoucontractTermination.mapper; + +import org.dromara.xzd.contractManagement.caigoucontractTermination.domain.XzdPurchaseContractSuspend; +import org.dromara.xzd.contractManagement.caigoucontractTermination.domain.vo.XzdPurchaseContractSuspendVo; +import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; + +/** + * 采购合同终止Mapper接口 + * + * @author Lion Li + * @date 2025-10-13 + */ +public interface XzdPurchaseContractSuspendMapper extends BaseMapperPlus { + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/caigoucontractTermination/service/IXzdPurchaseContractSuspendService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/caigoucontractTermination/service/IXzdPurchaseContractSuspendService.java new file mode 100644 index 00000000..90936bf7 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/caigoucontractTermination/service/IXzdPurchaseContractSuspendService.java @@ -0,0 +1,70 @@ +package org.dromara.xzd.contractManagement.caigoucontractTermination.service; + +import org.dromara.xzd.contractManagement.caigoucontractTermination.domain.vo.XzdPurchaseContractSuspendVo; +import org.dromara.xzd.contractManagement.caigoucontractTermination.domain.bo.XzdPurchaseContractSuspendBo; +import org.dromara.xzd.contractManagement.caigoucontractTermination.domain.XzdPurchaseContractSuspend; +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-10-13 + */ +public interface IXzdPurchaseContractSuspendService extends IService{ + + /** + * 查询采购合同终止 + * + * @param id 主键 + * @return 采购合同终止 + */ + XzdPurchaseContractSuspendVo queryById(Long id); + + /** + * 分页查询采购合同终止列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 采购合同终止分页列表 + */ + TableDataInfo queryPageList(XzdPurchaseContractSuspendBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的采购合同终止列表 + * + * @param bo 查询条件 + * @return 采购合同终止列表 + */ + List queryList(XzdPurchaseContractSuspendBo bo); + + /** + * 新增采购合同终止 + * + * @param bo 采购合同终止 + * @return 是否新增成功 + */ + Boolean insertByBo(XzdPurchaseContractSuspendBo bo); + + /** + * 修改采购合同终止 + * + * @param bo 采购合同终止 + * @return 是否修改成功 + */ + Boolean updateByBo(XzdPurchaseContractSuspendBo 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/contractManagement/caigoucontractTermination/service/impl/XzdPurchaseContractSuspendServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/caigoucontractTermination/service/impl/XzdPurchaseContractSuspendServiceImpl.java new file mode 100644 index 00000000..c428ba1f --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/caigoucontractTermination/service/impl/XzdPurchaseContractSuspendServiceImpl.java @@ -0,0 +1,179 @@ +package org.dromara.xzd.contractManagement.caigoucontractTermination.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +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.system.service.impl.SysOssServiceImpl; +import org.dromara.xzd.biddingManagement.biaoqianlixiang.domain.vo.XzdBidPreProjectVo; +import org.dromara.xzd.contractManagement.purchaseManagement.domain.XzdPurchaseContractInformation; +import org.dromara.xzd.utilS.AreaUtil; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.dromara.xzd.contractManagement.caigoucontractTermination.domain.bo.XzdPurchaseContractSuspendBo; +import org.dromara.xzd.contractManagement.caigoucontractTermination.domain.vo.XzdPurchaseContractSuspendVo; +import org.dromara.xzd.contractManagement.caigoucontractTermination.domain.XzdPurchaseContractSuspend; +import org.dromara.xzd.contractManagement.caigoucontractTermination.mapper.XzdPurchaseContractSuspendMapper; +import org.dromara.xzd.contractManagement.caigoucontractTermination.service.IXzdPurchaseContractSuspendService; + +import java.time.LocalDate; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.Collection; +import java.util.stream.Collectors; + +/** + * 采购合同终止Service业务层处理 + * + * @author Lion Li + * @date 2025-10-13 + */ +@RequiredArgsConstructor +@Service +public class XzdPurchaseContractSuspendServiceImpl extends ServiceImpl implements IXzdPurchaseContractSuspendService { + + private final XzdPurchaseContractSuspendMapper baseMapper; + + @Autowired + private SysOssServiceImpl sysOssService; + + private final AreaUtil areaUtil; + + /** + * 查询采购合同终止 + * + * @param id 主键 + * @return 采购合同终止 + */ + @Override + public XzdPurchaseContractSuspendVo queryById(Long id){ + return baseMapper.selectVoById(id); + } + + /** + * 分页查询采购合同终止列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 采购合同终止分页列表 + */ + @Override + public TableDataInfo queryPageList(XzdPurchaseContractSuspendBo 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(XzdPurchaseContractSuspendBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private LambdaQueryWrapper buildQueryWrapper(XzdPurchaseContractSuspendBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.orderByDesc(XzdPurchaseContractSuspend::getId); + lqw.eq(bo.getContractInformationId() != null, XzdPurchaseContractSuspend::getContractInformationId, bo.getContractInformationId()); + lqw.eq(StringUtils.isNotBlank(bo.getReceiptsCode()), XzdPurchaseContractSuspend::getReceiptsCode, bo.getReceiptsCode()); + lqw.eq(StringUtils.isNotBlank(bo.getTitle()), XzdPurchaseContractSuspend::getTitle, bo.getTitle()); + lqw.eq(bo.getDocumentDate() != null, XzdPurchaseContractSuspend::getDocumentDate, bo.getDocumentDate()); + lqw.like(StringUtils.isNotBlank(bo.getContractName()), XzdPurchaseContractSuspend::getContractName, bo.getContractName()); + lqw.eq(bo.getTerminationDate() != null, XzdPurchaseContractSuspend::getTerminationDate, bo.getTerminationDate()); + lqw.eq(StringUtils.isNotBlank(bo.getProject()), XzdPurchaseContractSuspend::getProject, bo.getProject()); + lqw.eq(bo.getArtyBUnit() != null, XzdPurchaseContractSuspend::getArtyBUnit, bo.getArtyBUnit()); + lqw.eq(bo.getPartyAUnit() != null, XzdPurchaseContractSuspend::getPartyAUnit, bo.getPartyAUnit()); + lqw.eq(StringUtils.isNotBlank(bo.getTerminationCause()), XzdPurchaseContractSuspend::getTerminationCause, bo.getTerminationCause()); + lqw.eq(StringUtils.isNotBlank(bo.getProjectCategory()), XzdPurchaseContractSuspend::getProjectCategory, bo.getProjectCategory()); + lqw.eq(StringUtils.isNotBlank(bo.getProjectType()), XzdPurchaseContractSuspend::getProjectType, bo.getProjectType()); + lqw.eq(StringUtils.isNotBlank(bo.getRemarks()), XzdPurchaseContractSuspend::getRemarks, bo.getRemarks()); + lqw.eq(bo.getContractAmount() != null, XzdPurchaseContractSuspend::getContractAmount, bo.getContractAmount()); + lqw.eq(bo.getCumulativeSettlementAmount() != null, XzdPurchaseContractSuspend::getCumulativeSettlementAmount, bo.getCumulativeSettlementAmount()); + lqw.eq(bo.getCumulativePaymentAmount() != null, XzdPurchaseContractSuspend::getCumulativePaymentAmount, bo.getCumulativePaymentAmount()); + lqw.eq(bo.getIsSeal() != null, XzdPurchaseContractSuspend::getIsSeal, bo.getIsSeal()); + lqw.eq(StringUtils.isNotBlank(bo.getFileId()), XzdPurchaseContractSuspend::getFileId, bo.getFileId()); + lqw.eq(StringUtils.isNotBlank(bo.getAuditStatus()), XzdPurchaseContractSuspend::getAuditStatus, bo.getAuditStatus()); + return lqw; + } + + /** + * 新增采购合同终止 + * + * @param bo 采购合同终止 + * @return 是否新增成功 + */ + @Override + public Boolean insertByBo(XzdPurchaseContractSuspendBo bo) { + XzdPurchaseContractSuspend add = MapstructUtils.convert(bo, XzdPurchaseContractSuspend.class); + validEntityBeforeSave(add); + + Long l = baseMapper.selectCount(new LambdaQueryWrapper().gt(XzdPurchaseContractSuspend::getCreateTime, LocalDate.now())); + String s = areaUtil.generateDateBasedNumber(); + boolean flag = baseMapper.insert(add) > 0; + + add.setReceiptsCode(s+"-"+(l+1)); + if (flag) { + bo.setId(add.getId()); + } + return flag; + } + + /** + * 修改采购合同终止 + * + * @param bo 采购合同终止 + * @return 是否修改成功 + */ + @Override + public Boolean updateByBo(XzdPurchaseContractSuspendBo bo) { + XzdPurchaseContractSuspend update = MapstructUtils.convert(bo, XzdPurchaseContractSuspend.class); + validEntityBeforeSave(update); + return baseMapper.updateById(update) > 0; + } + + /** + * 保存前的数据校验 + */ + private void validEntityBeforeSave(XzdPurchaseContractSuspend entity){ + //TODO 做一些数据校验,如唯一约束 + } + + /** + * 校验并批量删除采购合同终止信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + @Override + public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { + if(isValid){ + + } + + for (Long id : ids) { + XzdPurchaseContractSuspendVo vo = baseMapper.selectVoById(id); + // 删除附件 + if (!StringUtils.isEmpty(vo.getFileId())){ + List collect = Arrays.stream(vo.getFileId().split(",")).map(item -> { + return Long.parseLong(item); + }).collect(Collectors.toList()); + sysOssService.deleteWithValidByIds(collect, false); + } + } + + return baseMapper.deleteByIds(ids) > 0; + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/caigouhetongbiangeng/controller/XzdPurchaseContractAlterationController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/caigouhetongbiangeng/controller/XzdPurchaseContractAlterationController.java new file mode 100644 index 00000000..38f06969 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/caigouhetongbiangeng/controller/XzdPurchaseContractAlterationController.java @@ -0,0 +1,105 @@ +package org.dromara.xzd.contractManagement.caigouhetongbiangeng.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.contractManagement.caigouhetongbiangeng.domain.vo.XzdPurchaseContractAlterationVo; +import org.dromara.xzd.contractManagement.caigouhetongbiangeng.domain.bo.XzdPurchaseContractAlterationBo; +import org.dromara.xzd.contractManagement.caigouhetongbiangeng.service.IXzdPurchaseContractAlterationService; +import org.dromara.common.mybatis.core.page.TableDataInfo; + +/** + * 采购合同变更 + * + * @author Lion Li + * @date 2025-10-13 + */ +@Validated +@RequiredArgsConstructor +@RestController +@RequestMapping("/hetongbiangeng/purchaseContractAlteration") +public class XzdPurchaseContractAlterationController extends BaseController { + + private final IXzdPurchaseContractAlterationService xzdPurchaseContractAlterationService; + + /** + * 查询采购合同变更列表 + */ + @SaCheckPermission("hetongbiangeng:purchaseContractAlteration:list") + @GetMapping("/list") + public TableDataInfo list(XzdPurchaseContractAlterationBo bo, PageQuery pageQuery) { + return xzdPurchaseContractAlterationService.queryPageList(bo, pageQuery); + } + + /** + * 导出采购合同变更列表 + */ + @SaCheckPermission("hetongbiangeng:purchaseContractAlteration:export") + @Log(title = "采购合同变更", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(XzdPurchaseContractAlterationBo bo, HttpServletResponse response) { + List list = xzdPurchaseContractAlterationService.queryList(bo); + ExcelUtil.exportExcel(list, "采购合同变更", XzdPurchaseContractAlterationVo.class, response); + } + + /** + * 获取采购合同变更详细信息 + * + * @param id 主键 + */ + @SaCheckPermission("hetongbiangeng:purchaseContractAlteration:query") + @GetMapping("/{id}") + public R getInfo(@NotNull(message = "主键不能为空") + @PathVariable Long id) { + return R.ok(xzdPurchaseContractAlterationService.queryById(id)); + } + + /** + * 新增采购合同变更 + */ + @SaCheckPermission("hetongbiangeng:purchaseContractAlteration:add") + @Log(title = "采购合同变更", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping() + public R add(@Validated(AddGroup.class) @RequestBody XzdPurchaseContractAlterationBo bo) { + return toAjax(xzdPurchaseContractAlterationService.insertByBo(bo)); + } + + /** + * 修改采购合同变更 + */ + @SaCheckPermission("hetongbiangeng:purchaseContractAlteration:edit") + @Log(title = "采购合同变更", businessType = BusinessType.UPDATE) + @RepeatSubmit() + @PutMapping() + public R edit(@Validated(EditGroup.class) @RequestBody XzdPurchaseContractAlterationBo bo) { + return toAjax(xzdPurchaseContractAlterationService.updateByBo(bo)); + } + + /** + * 删除采购合同变更 + * + * @param ids 主键串 + */ + @SaCheckPermission("hetongbiangeng:purchaseContractAlteration:remove") + @Log(title = "采购合同变更", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public R remove(@NotEmpty(message = "主键不能为空") + @PathVariable Long[] ids) { + return toAjax(xzdPurchaseContractAlterationService.deleteWithValidByIds(List.of(ids), true)); + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/caigouhetongbiangeng/domain/XzdPurchaseContractAlteration.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/caigouhetongbiangeng/domain/XzdPurchaseContractAlteration.java new file mode 100644 index 00000000..f7c795be --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/caigouhetongbiangeng/domain/XzdPurchaseContractAlteration.java @@ -0,0 +1,207 @@ +package org.dromara.xzd.contractManagement.caigouhetongbiangeng.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.time.LocalDate; +import java.util.Date; + +import java.io.Serial; + +/** + * 采购合同变更对象 xzd_purchase_contract_alteration + * + * @author Lion Li + * @date 2025-10-13 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("xzd_purchase_contract_alteration") +public class XzdPurchaseContractAlteration extends BaseEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键ID + */ + @TableId(value = "id") + private Long id; + + /** + * 采购合同信息ID(合同编码) + */ + private Long contractInformationId; + + /** + * 单据编码 + */ + private String receiptsCode; + + /** + * 标题 + */ + private String title; + + /** + * 单据日期 + */ + private LocalDate documentDate; + + /** + * 合同名称 + */ + private String contractName; + + /** + * 合同类型 + */ + private String contractType; + + /** + * 变更类型 + */ + private String alterationType; + + /** + * 项目名称 + */ + private String project; + + /** + * 经营模式 + */ + private String businessModel; + + /** + * 原合同造价 + */ + private Long originalContractCost; + + /** + * 支付比例 + */ + private BigDecimal paymentRatio; + + /** + * 甲方单位 + */ + private Long partyAUnit; + + /** + * 集采模式 + */ + private Long centralizedPurchasingMode; + + /** + * 乙方单位 + */ + private Long artyBUnit; + + /** + * 警示信息 + */ + private String warning; + + /** + * 累计变更金额 + */ + private Long cumulativeChangeAmount; + + /** + * 支付条款 + */ + private String paymentTerms; + + /** + * 备注说明 + */ + private String remarks; + + /** + * 变更原合同单项已结工程量 + */ + private Long biangengyuanhetong; + + /** + * 是否用印:1-是,0-否 + */ + private Long isSeal; + + /** + * 变更后项目经理 + */ + private Long changeProjectManager; + + /** + * 变更后项目责任人 + */ + private Long changeProjectResponsible; + + /** + * 变更后现场经理 + */ + private Long changeSiteManager; + + /** + * 变更后现场经理 + */ + private Long changeContractRemarks; + + /** + * 项目大类 + */ + private String projectCategory; + + /** + * 项目类型 + */ + private String projectType; + + /** + * 付款额不能超合同额:1-是,0-否 + */ + private Long paymentNotExceedPayment; + + /** + * 付款额不能超合同额支付比例 + */ + private BigDecimal paymentNotExceedContractRatio; + + /** + * 付款额是否不能超支付比例:1-是,0-否 + */ + private Long paymentNotExceedPaymentRatio; + + /** + * 预结算/结算额是否不能超合同额:1-是,0-否 + */ + private Long preSettlementNotExceedContract; + + /** + * 预结算/结算额不能超合同额比例 + */ + private BigDecimal preSettlementNotExceedContractRatio; + + /** + * 文件ID + */ + private String fileId; + + /** + * 备注 + */ + private String remark; + + /** + * 审核状态 + */ + private String auditStatus; + + + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/caigouhetongbiangeng/domain/bo/XzdPurchaseContractAlterationBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/caigouhetongbiangeng/domain/bo/XzdPurchaseContractAlterationBo.java new file mode 100644 index 00000000..7eddae66 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/caigouhetongbiangeng/domain/bo/XzdPurchaseContractAlterationBo.java @@ -0,0 +1,225 @@ +package org.dromara.xzd.contractManagement.caigouhetongbiangeng.domain.bo; + +import org.dromara.xzd.contractManagement.caigouhetongbiangeng.domain.XzdPurchaseContractAlteration; +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 org.dromara.xzd.domain.XzdContractAdvanceInfo; +import org.dromara.xzd.domain.XzdContractClause; +import org.dromara.xzd.domain.XzdDeductionItems; + +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.util.Date; +import java.util.List; + +/** + * 采购合同变更业务对象 xzd_purchase_contract_alteration + * + * @author Lion Li + * @date 2025-10-13 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = XzdPurchaseContractAlteration.class, reverseConvertGenerate = false) +public class XzdPurchaseContractAlterationBo extends BaseEntity { + + /** + * 主键ID + */ + private Long id; + + /** + * 采购合同信息ID(合同编码) + */ + private Long contractInformationId; + + /** + * 单据编码 + */ + private String receiptsCode; + + /** + * 标题 + */ + private String title; + + /** + * 单据日期 + */ + private LocalDate documentDate; + + /** + * 合同名称 + */ + private String contractName; + + /** + * 合同类型 + */ + private String contractType; + + /** + * 变更类型 + */ + private String alterationType; + + /** + * 项目名称 + */ + private String project; + + /** + * 经营模式 + */ + private String businessModel; + + /** + * 原合同造价 + */ + private Long originalContractCost; + + /** + * 支付比例 + */ + private BigDecimal paymentRatio; + + /** + * 甲方单位 + */ + private Long partyAUnit; + + /** + * 集采模式 + */ + private Long centralizedPurchasingMode; + + /** + * 乙方单位 + */ + private Long artyBUnit; + + /** + * 警示信息 + */ + private String warning; + + /** + * 累计变更金额 + */ + private Long cumulativeChangeAmount; + + /** + * 支付条款 + */ + private String paymentTerms; + + /** + * 备注说明 + */ + private String remarks; + + /** + * 变更原合同单项已结工程量 + */ + private Long biangengyuanhetong; + + /** + * 是否用印:1-是,0-否 + */ + private Long isSeal; + + /** + * 变更后项目经理 + */ + private Long changeProjectManager; + + /** + * 变更后项目责任人 + */ + private Long changeProjectResponsible; + + /** + * 变更后现场经理 + */ + private Long changeSiteManager; + + /** + * 变更后现场经理 + */ + private Long changeContractRemarks; + + /** + * 项目大类 + */ + private String projectCategory; + + /** + * 项目类型 + */ + private String projectType; + + /** + * 付款额不能超合同额:1-是,0-否 + */ + private Long paymentNotExceedPayment; + + /** + * 付款额不能超合同额支付比例 + */ + private BigDecimal paymentNotExceedContractRatio; + + /** + * 付款额是否不能超支付比例:1-是,0-否 + */ + private Long paymentNotExceedPaymentRatio; + + /** + * 预结算/结算额是否不能超合同额:1-是,0-否 + */ + private Long preSettlementNotExceedContract; + + /** + * 预结算/结算额不能超合同额比例 + */ + private BigDecimal preSettlementNotExceedContractRatio; + + /** + * 文件ID + */ + private String fileId; + + /** + * 备注 + */ + private String remark; + + /** + * 审核状态 + */ + private String auditStatus; + + + + /** + * 预收款项 + */ + private List yskx; + + /** + * 扣款与奖励项 + */ + private List kkyjlx; + + /** + * 合同条款 + */ + private List httk; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/caigouhetongbiangeng/domain/vo/XzdPurchaseContractAlterationVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/caigouhetongbiangeng/domain/vo/XzdPurchaseContractAlterationVo.java new file mode 100644 index 00000000..1e1a4d0e --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/caigouhetongbiangeng/domain/vo/XzdPurchaseContractAlterationVo.java @@ -0,0 +1,253 @@ +package org.dromara.xzd.contractManagement.caigouhetongbiangeng.domain.vo; + +import java.math.BigDecimal; +import java.time.LocalDate; +import java.util.Date; + +import org.dromara.xzd.contractManagement.caigouhetongbiangeng.domain.XzdPurchaseContractAlteration; +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 org.dromara.xzd.contractManagement.purchaseManagement.domain.vo.XzdPurchaseContractInformationVo; + +import java.io.Serial; +import java.io.Serializable; + + +/** + * 采购合同变更视图对象 xzd_purchase_contract_alteration + * + * @author Lion Li + * @date 2025-10-13 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = XzdPurchaseContractAlteration.class) +public class XzdPurchaseContractAlterationVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键ID + */ + @ExcelProperty(value = "主键ID") + private Long id; + + /** + * 采购合同信息ID(合同编码) + */ + @ExcelProperty(value = "采购合同信息ID", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "合=同编码") + private Long contractInformationId; + + /** + * 单据编码 + */ + @ExcelProperty(value = "单据编码") + private String receiptsCode; + + /** + * 标题 + */ + @ExcelProperty(value = "标题") + private String title; + + /** + * 单据日期 + */ + @ExcelProperty(value = "单据日期") + private LocalDate documentDate; + + /** + * 合同名称 + */ + @ExcelProperty(value = "合同名称") + private String contractName; + + /** + * 合同类型 + */ + @ExcelProperty(value = "合同类型") + private String contractType; + + /** + * 变更类型 + */ + @ExcelProperty(value = "变更类型") + private String alterationType; + + /** + * 项目名称 + */ + @ExcelProperty(value = "项目名称") + private String project; + + /** + * 经营模式 + */ + @ExcelProperty(value = "经营模式") + private String businessModel; + + /** + * 原合同造价 + */ + @ExcelProperty(value = "原合同造价") + private Long originalContractCost; + + /** + * 支付比例 + */ + @ExcelProperty(value = "支付比例") + private BigDecimal paymentRatio; + + /** + * 甲方单位 + */ + @ExcelProperty(value = "甲方单位") + private Long partyAUnit; + + /** + * 集采模式 + */ + @ExcelProperty(value = "集采模式") + private Long centralizedPurchasingMode; + + /** + * 乙方单位 + */ + @ExcelProperty(value = "乙方单位") + private Long artyBUnit; + + /** + * 警示信息 + */ + @ExcelProperty(value = "警示信息") + private String warning; + + /** + * 累计变更金额 + */ + @ExcelProperty(value = "累计变更金额") + private Long cumulativeChangeAmount; + + /** + * 支付条款 + */ + @ExcelProperty(value = "支付条款") + private String paymentTerms; + + /** + * 备注说明 + */ + @ExcelProperty(value = "备注说明") + private String remarks; + + /** + * 变更原合同单项已结工程量 + */ + @ExcelProperty(value = "变更原合同单项已结工程量") + private Long biangengyuanhetong; + + /** + * 是否用印:1-是,0-否 + */ + @ExcelProperty(value = "是否用印:1-是,0-否") + private Long isSeal; + + /** + * 变更后项目经理 + */ + @ExcelProperty(value = "变更后项目经理") + private Long changeProjectManager; + + /** + * 变更后项目责任人 + */ + @ExcelProperty(value = "变更后项目责任人") + private Long changeProjectResponsible; + + /** + * 变更后现场经理 + */ + @ExcelProperty(value = "变更后现场经理") + private Long changeSiteManager; + + /** + * 变更后现场经理 + */ + @ExcelProperty(value = "变更后现场经理") + private Long changeContractRemarks; + + /** + * 项目大类 + */ + @ExcelProperty(value = "项目大类") + private String projectCategory; + + /** + * 项目类型 + */ + @ExcelProperty(value = "项目类型") + private String projectType; + + /** + * 付款额不能超合同额:1-是,0-否 + */ + @ExcelProperty(value = "付款额不能超合同额:1-是,0-否") + private Long paymentNotExceedPayment; + + /** + * 付款额不能超合同额支付比例 + */ + @ExcelProperty(value = "付款额不能超合同额支付比例") + private BigDecimal paymentNotExceedContractRatio; + + /** + * 付款额是否不能超支付比例:1-是,0-否 + */ + @ExcelProperty(value = "付款额是否不能超支付比例:1-是,0-否") + private Long paymentNotExceedPaymentRatio; + + /** + * 预结算/结算额是否不能超合同额:1-是,0-否 + */ + @ExcelProperty(value = "预结算/结算额是否不能超合同额:1-是,0-否") + private Long preSettlementNotExceedContract; + + /** + * 预结算/结算额不能超合同额比例 + */ + @ExcelProperty(value = "预结算/结算额不能超合同额比例") + private BigDecimal preSettlementNotExceedContractRatio; + + /** + * 文件ID + */ + @ExcelProperty(value = "文件ID") + private String fileId; + + /** + * 备注 + */ + @ExcelProperty(value = "备注") + private String remark; + + /** + * 审核状态 + */ + @ExcelProperty(value = "审核状态") + private String auditStatus; + + + /** + * 采购合同信息 + */ + private XzdPurchaseContractInformationVo xzdPurchaseContractInformationVo; + + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/caigouhetongbiangeng/mapper/XzdPurchaseContractAlterationMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/caigouhetongbiangeng/mapper/XzdPurchaseContractAlterationMapper.java new file mode 100644 index 00000000..5ba21442 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/caigouhetongbiangeng/mapper/XzdPurchaseContractAlterationMapper.java @@ -0,0 +1,15 @@ +package org.dromara.xzd.contractManagement.caigouhetongbiangeng.mapper; + +import org.dromara.xzd.contractManagement.caigouhetongbiangeng.domain.XzdPurchaseContractAlteration; +import org.dromara.xzd.contractManagement.caigouhetongbiangeng.domain.vo.XzdPurchaseContractAlterationVo; +import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; + +/** + * 采购合同变更Mapper接口 + * + * @author Lion Li + * @date 2025-10-13 + */ +public interface XzdPurchaseContractAlterationMapper extends BaseMapperPlus { + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/caigouhetongbiangeng/service/IXzdPurchaseContractAlterationService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/caigouhetongbiangeng/service/IXzdPurchaseContractAlterationService.java new file mode 100644 index 00000000..aba42223 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/caigouhetongbiangeng/service/IXzdPurchaseContractAlterationService.java @@ -0,0 +1,70 @@ +package org.dromara.xzd.contractManagement.caigouhetongbiangeng.service; + +import org.dromara.xzd.contractManagement.caigouhetongbiangeng.domain.vo.XzdPurchaseContractAlterationVo; +import org.dromara.xzd.contractManagement.caigouhetongbiangeng.domain.bo.XzdPurchaseContractAlterationBo; +import org.dromara.xzd.contractManagement.caigouhetongbiangeng.domain.XzdPurchaseContractAlteration; +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-10-13 + */ +public interface IXzdPurchaseContractAlterationService extends IService{ + + /** + * 查询采购合同变更 + * + * @param id 主键 + * @return 采购合同变更 + */ + XzdPurchaseContractAlterationVo queryById(Long id); + + /** + * 分页查询采购合同变更列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 采购合同变更分页列表 + */ + TableDataInfo queryPageList(XzdPurchaseContractAlterationBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的采购合同变更列表 + * + * @param bo 查询条件 + * @return 采购合同变更列表 + */ + List queryList(XzdPurchaseContractAlterationBo bo); + + /** + * 新增采购合同变更 + * + * @param bo 采购合同变更 + * @return 是否新增成功 + */ + Boolean insertByBo(XzdPurchaseContractAlterationBo bo); + + /** + * 修改采购合同变更 + * + * @param bo 采购合同变更 + * @return 是否修改成功 + */ + Boolean updateByBo(XzdPurchaseContractAlterationBo 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/contractManagement/caigouhetongbiangeng/service/impl/XzdPurchaseContractAlterationServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/caigouhetongbiangeng/service/impl/XzdPurchaseContractAlterationServiceImpl.java new file mode 100644 index 00000000..52199277 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/caigouhetongbiangeng/service/impl/XzdPurchaseContractAlterationServiceImpl.java @@ -0,0 +1,298 @@ +package org.dromara.xzd.contractManagement.caigouhetongbiangeng.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +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.system.service.impl.SysOssServiceImpl; +import org.dromara.xzd.contractManagement.purchaseManagement.domain.vo.XzdPurchaseContractInformationVo; +import org.dromara.xzd.contractManagement.purchaseManagement.service.IXzdPurchaseContractInformationService; +import org.dromara.xzd.domain.XzdContractAdvanceInfo; +import org.dromara.xzd.domain.XzdContractClause; +import org.dromara.xzd.domain.XzdDeductionItems; +import org.dromara.xzd.domain.XzdSettlementRules; +import org.dromara.xzd.enums.XzdClassEnum; +import org.dromara.xzd.service.IXzdContractAdvanceInfoService; +import org.dromara.xzd.service.IXzdContractClauseService; +import org.dromara.xzd.service.IXzdCorrespondentList; +import org.dromara.xzd.service.IXzdDeductionItemsService; +import org.dromara.xzd.service.impl.*; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.dromara.xzd.contractManagement.caigouhetongbiangeng.domain.bo.XzdPurchaseContractAlterationBo; +import org.dromara.xzd.contractManagement.caigouhetongbiangeng.domain.vo.XzdPurchaseContractAlterationVo; +import org.dromara.xzd.contractManagement.caigouhetongbiangeng.domain.XzdPurchaseContractAlteration; +import org.dromara.xzd.contractManagement.caigouhetongbiangeng.mapper.XzdPurchaseContractAlterationMapper; +import org.dromara.xzd.contractManagement.caigouhetongbiangeng.service.IXzdPurchaseContractAlterationService; + +import java.util.*; + +/** + * 采购合同变更Service业务层处理 + * + * @author Lion Li + * @date 2025-10-13 + */ +@RequiredArgsConstructor +@Service +public class XzdPurchaseContractAlterationServiceImpl extends ServiceImpl implements IXzdPurchaseContractAlterationService { + + private final XzdPurchaseContractAlterationMapper baseMapper; + + private final IXzdContractAdvanceInfoService iXzdContractAdvanceInfoService; + + private final IXzdDeductionItemsService iXzdDeductionItemsService; + + private final IXzdContractClauseService iXzdContractClauseService; + private final IXzdPurchaseContractInformationService iXzdPurchaseContractInformationService; + + @Autowired + private XzdContractAdvanceInfoServiceImpl xzdContractAdvanceInfoService; + @Autowired + private XzdDeductionItemsServiceImpl xzdDeductionItemsService; + @Autowired + private XzdContractClauseServiceImpl xzdContractClauseService; + @Autowired + private XzdSettlementRulesServiceImpl xzdSettlementRulesService; + @Autowired + private XzdContractDepositInfoServiceImpl xzdContractDepositInfoService; + @Autowired + private SysOssServiceImpl sysOssService; + + /** + * 查询采购合同变更 + * + * @param id 主键 + * @return 采购合同变更 + */ + @Override + public XzdPurchaseContractAlterationVo queryById(Long id){ + XzdPurchaseContractAlterationVo xzdPurchaseContractAlterationVo = baseMapper.selectVoById(id); + XzdPurchaseContractInformationVo vo = iXzdPurchaseContractInformationService.queryById(xzdPurchaseContractAlterationVo.getContractInformationId()); + xzdPurchaseContractAlterationVo.setXzdPurchaseContractInformationVo( vo); + + return xzdPurchaseContractAlterationVo; + } + + /** + * 分页查询采购合同变更列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 采购合同变更分页列表 + */ + @Override + public TableDataInfo queryPageList(XzdPurchaseContractAlterationBo 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(XzdPurchaseContractAlterationBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private LambdaQueryWrapper buildQueryWrapper(XzdPurchaseContractAlterationBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.orderByDesc(XzdPurchaseContractAlteration::getId); + lqw.eq(bo.getContractInformationId() != null, XzdPurchaseContractAlteration::getContractInformationId, bo.getContractInformationId()); + lqw.eq(StringUtils.isNotBlank(bo.getReceiptsCode()), XzdPurchaseContractAlteration::getReceiptsCode, bo.getReceiptsCode()); + lqw.eq(StringUtils.isNotBlank(bo.getTitle()), XzdPurchaseContractAlteration::getTitle, bo.getTitle()); + lqw.eq(bo.getDocumentDate() != null, XzdPurchaseContractAlteration::getDocumentDate, bo.getDocumentDate()); + lqw.like(StringUtils.isNotBlank(bo.getContractName()), XzdPurchaseContractAlteration::getContractName, bo.getContractName()); + lqw.eq(StringUtils.isNotBlank(bo.getContractType()), XzdPurchaseContractAlteration::getContractType, bo.getContractType()); + lqw.eq(StringUtils.isNotBlank(bo.getAlterationType()), XzdPurchaseContractAlteration::getAlterationType, bo.getAlterationType()); + lqw.eq(StringUtils.isNotBlank(bo.getProject()), XzdPurchaseContractAlteration::getProject, bo.getProject()); + lqw.eq(StringUtils.isNotBlank(bo.getBusinessModel()), XzdPurchaseContractAlteration::getBusinessModel, bo.getBusinessModel()); + lqw.eq(bo.getOriginalContractCost() != null, XzdPurchaseContractAlteration::getOriginalContractCost, bo.getOriginalContractCost()); + lqw.eq(bo.getPaymentRatio() != null, XzdPurchaseContractAlteration::getPaymentRatio, bo.getPaymentRatio()); + lqw.eq(bo.getPartyAUnit() != null, XzdPurchaseContractAlteration::getPartyAUnit, bo.getPartyAUnit()); + lqw.eq(bo.getCentralizedPurchasingMode() != null, XzdPurchaseContractAlteration::getCentralizedPurchasingMode, bo.getCentralizedPurchasingMode()); + lqw.eq(bo.getArtyBUnit() != null, XzdPurchaseContractAlteration::getArtyBUnit, bo.getArtyBUnit()); + lqw.eq(StringUtils.isNotBlank(bo.getWarning()), XzdPurchaseContractAlteration::getWarning, bo.getWarning()); + lqw.eq(bo.getCumulativeChangeAmount() != null, XzdPurchaseContractAlteration::getCumulativeChangeAmount, bo.getCumulativeChangeAmount()); + lqw.eq(StringUtils.isNotBlank(bo.getPaymentTerms()), XzdPurchaseContractAlteration::getPaymentTerms, bo.getPaymentTerms()); + lqw.eq(StringUtils.isNotBlank(bo.getRemarks()), XzdPurchaseContractAlteration::getRemarks, bo.getRemarks()); + lqw.eq(bo.getBiangengyuanhetong() != null, XzdPurchaseContractAlteration::getBiangengyuanhetong, bo.getBiangengyuanhetong()); + lqw.eq(bo.getIsSeal() != null, XzdPurchaseContractAlteration::getIsSeal, bo.getIsSeal()); + lqw.eq(bo.getChangeProjectManager() != null, XzdPurchaseContractAlteration::getChangeProjectManager, bo.getChangeProjectManager()); + lqw.eq(bo.getChangeProjectResponsible() != null, XzdPurchaseContractAlteration::getChangeProjectResponsible, bo.getChangeProjectResponsible()); + lqw.eq(bo.getChangeSiteManager() != null, XzdPurchaseContractAlteration::getChangeSiteManager, bo.getChangeSiteManager()); + lqw.eq(bo.getChangeContractRemarks() != null, XzdPurchaseContractAlteration::getChangeContractRemarks, bo.getChangeContractRemarks()); + lqw.eq(StringUtils.isNotBlank(bo.getProjectCategory()), XzdPurchaseContractAlteration::getProjectCategory, bo.getProjectCategory()); + lqw.eq(StringUtils.isNotBlank(bo.getProjectType()), XzdPurchaseContractAlteration::getProjectType, bo.getProjectType()); + lqw.eq(bo.getPaymentNotExceedPayment() != null, XzdPurchaseContractAlteration::getPaymentNotExceedPayment, bo.getPaymentNotExceedPayment()); + lqw.eq(bo.getPaymentNotExceedContractRatio() != null, XzdPurchaseContractAlteration::getPaymentNotExceedContractRatio, bo.getPaymentNotExceedContractRatio()); + lqw.eq(bo.getPaymentNotExceedPaymentRatio() != null, XzdPurchaseContractAlteration::getPaymentNotExceedPaymentRatio, bo.getPaymentNotExceedPaymentRatio()); + lqw.eq(bo.getPreSettlementNotExceedContract() != null, XzdPurchaseContractAlteration::getPreSettlementNotExceedContract, bo.getPreSettlementNotExceedContract()); + lqw.eq(bo.getPreSettlementNotExceedContractRatio() != null, XzdPurchaseContractAlteration::getPreSettlementNotExceedContractRatio, bo.getPreSettlementNotExceedContractRatio()); + lqw.eq(StringUtils.isNotBlank(bo.getFileId()), XzdPurchaseContractAlteration::getFileId, bo.getFileId()); + lqw.eq(StringUtils.isNotBlank(bo.getAuditStatus()), XzdPurchaseContractAlteration::getAuditStatus, bo.getAuditStatus()); + + return lqw; + } + + /** + * 新增采购合同变更 + * + * @param bo 采购合同变更 + * @return 是否新增成功 + */ + @Override + public Boolean insertByBo(XzdPurchaseContractAlterationBo bo) { + XzdPurchaseContractAlteration add = MapstructUtils.convert(bo, XzdPurchaseContractAlteration.class); + validEntityBeforeSave(add); + String tableName = XzdClassEnum.PURCHASE_CONTRACT_INFORMATION.getClassName(); + + /** + * 预收款项 + */ + HashMap hashMap = new HashMap<>(); + hashMap.put("contract_detailsId", add.getId()); + List yskx = bo.getYskx(); + yskx.forEach(item -> { + item.setTableName(tableName); + item.setContractDetailsId(add.getId()); + }); + iXzdContractAdvanceInfoService.saveBatch(yskx); + /** + * 扣款与奖励项 + */ + List kkyjlx = bo.getKkyjlx(); + kkyjlx.forEach(item -> { + item.setTableName(tableName); + item.setContractDetailsId(add.getId()); + }); + iXzdDeductionItemsService.saveBatch(kkyjlx); + /** + * 合同条款 + */ + List httk = bo.getHttk(); + httk.forEach(item -> { + item.setTableName(tableName); + item.setContractDetailsId(add.getId()); + }); + iXzdContractClauseService.saveBatch(httk); + boolean flag = baseMapper.insert(add) > 0; + if (flag) { + bo.setId(add.getId()); + } + return flag; + } + + /** + * 修改采购合同变更 + * + * @param bo 采购合同变更 + * @return 是否修改成功 + */ + @Override + public Boolean updateByBo(XzdPurchaseContractAlterationBo bo) { + XzdPurchaseContractAlteration add = MapstructUtils.convert(bo, XzdPurchaseContractAlteration.class); + + /** + * 预收款项 优先删除数据在添加 + */ + String tableName = XzdClassEnum.PURCHASE_CONTRACT_INFORMATION.getClassName(); + HashMap hashMap = new HashMap<>(); + hashMap.put("contract_details_id", add.getId()); + List yskx = bo.getYskx(); + iXzdContractAdvanceInfoService.getBaseMapper().deleteByMap(hashMap); + if (yskx != null){ + yskx.forEach(item -> { + item.setTableName(tableName); + item.setContractDetailsId(add.getId()); + }); + iXzdContractAdvanceInfoService.saveBatch(yskx); + } + /** + * 扣款与奖励项 + */ + List kkyjlx = bo.getKkyjlx(); + iXzdDeductionItemsService.getBaseMapper().deleteByMap(hashMap); + if(kkyjlx != null){ + kkyjlx.forEach(item -> { + item.setTableName(tableName); + item.setContractDetailsId(add.getId()); + }); + iXzdDeductionItemsService.saveBatch(kkyjlx); + } + /** + * 合同条款 + */ + List httk = bo.getHttk(); + iXzdContractClauseService.getBaseMapper().deleteByMap(hashMap); + if (httk != null){ + httk.forEach(item -> { + item.setTableName(tableName); + item.setContractDetailsId(add.getId()); + }); + iXzdContractClauseService.saveBatch(httk); + } + return baseMapper.updateById(add) > 0; + } + + /** + * 保存前的数据校验 + */ + private void validEntityBeforeSave(XzdPurchaseContractAlteration entity){ + + } + + /** + * 校验并批量删除采购合同变更信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + @Override + public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { + for (Long id : ids) { + XzdPurchaseContractAlterationVo vo = baseMapper.selectVoById(id); + if (vo != null){ + //删除附件 + if (vo.getFileId()!= null && !vo.getFileId().isEmpty()){ + List deleteIds = Arrays.stream(vo.getFileId().split(",")).map(Long::valueOf).toList(); + if (!deleteIds.isEmpty()) { + sysOssService.deleteWithValidByIds(deleteIds, false); + } + } + } + //合同文本-预收款项 + LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); + lambdaQueryWrapper.in(XzdContractAdvanceInfo::getContractDetailsId, ids); + xzdContractAdvanceInfoService.remove(lambdaQueryWrapper); + //合同条款-扣款与奖励项 + LambdaQueryWrapper lambdaQueryWrapper1 = new LambdaQueryWrapper<>(); + lambdaQueryWrapper1.in(XzdDeductionItems::getContractDetailsId, ids); + xzdDeductionItemsService.remove(lambdaQueryWrapper1); + //合同条款-合同条款 + LambdaQueryWrapper lambdaQueryWrapper2 = new LambdaQueryWrapper<>(); + lambdaQueryWrapper2.in(XzdContractClause::getContractDetailsId, ids); + xzdContractClauseService.remove(lambdaQueryWrapper2); + //支付条款 + LambdaQueryWrapper lambdaQueryWrapper3 = new LambdaQueryWrapper<>(); + lambdaQueryWrapper3.in(XzdSettlementRules::getContractDetailsId, ids); + xzdSettlementRulesService.remove(lambdaQueryWrapper3); + } + if(isValid){ + //TODO 做一些业务上的校验,判断是否需要校验 + } + return baseMapper.deleteByIds(ids) > 0; + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/purchaseManagement/controller/XzdPurchaseContractInformationController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/purchaseManagement/controller/XzdPurchaseContractInformationController.java new file mode 100644 index 00000000..66da9fd7 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/purchaseManagement/controller/XzdPurchaseContractInformationController.java @@ -0,0 +1,106 @@ +package org.dromara.xzd.contractManagement.purchaseManagement.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.dromara.xzd.contractManagement.purchaseManagement.domain.bo.XzdPurchaseContractInformationBo; +import org.dromara.xzd.contractManagement.purchaseManagement.domain.vo.XzdPurchaseContractInformationVo; +import org.dromara.xzd.contractManagement.purchaseManagement.service.IXzdPurchaseContractInformationService; +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.common.mybatis.core.page.TableDataInfo; + +/** + * 采购合同信息 + * + * @author Lion Li + * @date 2025-10-13 + */ +@Validated +@RequiredArgsConstructor +@RestController +@RequestMapping("/contractManagement/purchaseContractInformation") +public class XzdPurchaseContractInformationController extends BaseController { + + private final IXzdPurchaseContractInformationService xzdPurchaseContractInformationService; + + /** + * 查询采购合同信息列表 + */ + @SaCheckPermission("contractManagement:purchaseContractInformation:list") + @GetMapping("/list") + public TableDataInfo list(XzdPurchaseContractInformationBo bo, PageQuery pageQuery) { + return xzdPurchaseContractInformationService.queryPageList(bo, pageQuery); + } + + /** + * 导出采购合同信息列表 + */ + @SaCheckPermission("contractManagement:purchaseContractInformation:export") + @Log(title = "采购合同信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(XzdPurchaseContractInformationBo bo, HttpServletResponse response) { + List list = xzdPurchaseContractInformationService.queryList(bo); + ExcelUtil.exportExcel(list, "采购合同信息", XzdPurchaseContractInformationVo.class, response); + } + + /** + * 获取采购合同信息详细信息 + * + * @param id 主键 + */ + @SaCheckPermission("contractManagement:purchaseContractInformation:query") + @GetMapping("/{id}") + public R getInfo(@NotNull(message = "主键不能为空") + @PathVariable Long id) { + return R.ok(xzdPurchaseContractInformationService.queryById(id)); + } + + /** + * 新增采购合同信息 + */ + @SaCheckPermission("contractManagement:purchaseContractInformation:add") + @Log(title = "采购合同信息", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping() + public R add(@Validated(AddGroup.class) @RequestBody XzdPurchaseContractInformationBo bo) { + return toAjax(xzdPurchaseContractInformationService.insertByBo(bo)); + } + + /** + * 修改采购合同信息 + */ + @SaCheckPermission("contractManagement:purchaseContractInformation:edit") + @Log(title = "采购合同信息", businessType = BusinessType.UPDATE) + @RepeatSubmit() + @PutMapping() + public R edit(@Validated(EditGroup.class) @RequestBody XzdPurchaseContractInformationBo bo) { + return toAjax(xzdPurchaseContractInformationService.updateByBo(bo)); + } + + /** + * 删除采购合同信息 + * + * @param ids 主键串 + */ + @SaCheckPermission("contractManagement:purchaseContractInformation:remove") + @Log(title = "采购合同信息", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public R remove(@NotEmpty(message = "主键不能为空") + @PathVariable Long[] ids) { + return toAjax(xzdPurchaseContractInformationService.deleteWithValidByIds(List.of(ids), true)); + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/purchaseManagement/domain/XzdPurchaseContractInformation.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/purchaseManagement/domain/XzdPurchaseContractInformation.java new file mode 100644 index 00000000..ccaf8921 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/purchaseManagement/domain/XzdPurchaseContractInformation.java @@ -0,0 +1,282 @@ +package org.dromara.xzd.contractManagement.purchaseManagement.domain; + +import org.dromara.common.mybatis.core.domain.BaseEntity; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.time.LocalDate; +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.io.Serial; + +/** + * 采购合同信息对象 xzd_purchase_contract_information + * + * @author Lion Li + * @date 2025-10-13 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("xzd_purchase_contract_information") +public class XzdPurchaseContractInformation extends BaseEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键ID + */ + @TableId(value = "id") + private Long id; + + /** + * 合同编码 + */ + private String contractCode; + + /** + * 合同名称 + */ + private String contractName; + + /** + * 单据日期 + */ + private LocalDate documentDate; + + /** + * 合同类型,例如:主要物资采购合同 + */ + private String contractType; + + /** + * 项目 + */ + private Long project; + + /** + * 经营模式 + */ + private String businessModel; + + /** + * 原合同造价 + */ + private Long originalContractCost; + + /** + * 签订日期 + */ + private LocalDate signingDate; + + /** + * 甲方单位 + */ + private Long partyAUnit; + + /** + * 含税合同金额 + */ + private Long taxInclusiveContractAmount; + + /** + * 合同状态,例如:新增 + */ + private String contractStatus; + + /** + * 累计变更金额 + */ + private Long cumulativeChangeAmount; + + /** + * 归档日期 + */ + private LocalDate filingDate; + + /** + * 管理组织 + */ + private Long managementOrganization; + + /** + * 开票单位(支持搜索,必填) + */ + private Long invoiceIssuingUnit; + + /** + * 收票单位(支持搜索,必填) + */ + private Long invoiceReceivingUnit; + + /** + * 警示信息 + */ + private String warning; + + /** + * 备注说明 + */ + private String remarks; + + /** + * 支付条款 + */ + private String paymentTerms; + + /** + * 集采模式 + */ + private Long centralizedPurchasingMode; + + /** + * 乙方单位 + */ + private Long partyBUnit; + + /** + * 其他收入合同组织 + */ + private Long otherIncomeContractOrganization; + + /** + * 其他收入合同项目 + */ + private Long otherIncomeContractProject; + + /** + * 其他收入合同类型 + */ + private Long otherIncomeContractType; + + /** + * 是否启用:1-是,0-否 + */ + private Long isEnabled; + + /** + * 大写合同价税合计 + */ + private String capitalizedTaxInclusiveTotal; + + /** + * 签约组织 + */ + private Long signingOrganization; + + /** + * 项目类型 + */ + private String projectType; + + /** + * 项目大类 + */ + private String projectCategory; + + /** + * 丙方单位 + */ + private Long partyCUnit; + + /** + * 丙方代表 + */ + private Long partyCRepresentative; + + /** + * 关联主合同 + */ + private String associatedMainContract; + + /** + * 项目责任人 + */ + private Long projectLeader; + + /** + * wbs + */ + private String wbs; + + /** + * 是否用印:1-是,0-否 + */ + private Long isSeal; + + /** + * 是否需备案:1-是,0-否 + */ + private Long needFiling; + + /** + * 备案状态,例如:未备案 + */ + private String filingStatus; + + /** + * 备案时间 + */ + private LocalDate filingTime; + + /** + * 预算分类,例如:计划成本 + */ + private Long budgetClassification; + + /** + * 是否为固定单价合同:1-是,0-否 + */ + private Long fixedUnitPriceContract; + + /** + * 是否为总价包干合同:1-是,0-否 + */ + private Long lumpSumContract; + + /** + * 付款额是否不能超支付比例:1-是,0-否 + */ + private Long paymentNotExceedPaymentRatio; + + /** + * 付款额不能超合同额:1-是,0-否 + */ + private Long paymentNotExceedPayment; + + /** + * 付款额不能超合同额支付比例 + */ + private Long paymentNotExceedContractRatio; + + /** + * 预结算/结算额是否不能超合同额:1-是,0-否 + */ + private Long preSettlementNotExceedContract; + + /** + * 预结算/结算额不能超合同额比例 + */ + private Long preSettlementNotExceedContractRatio; + + /** + * 文件ID + */ + private String fileId; + + /** + * 备注 + */ + private String remark; + + /** + * 审核状态 + */ + private String auditStatus; + + + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/purchaseManagement/domain/bo/XzdPurchaseContractInformationBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/purchaseManagement/domain/bo/XzdPurchaseContractInformationBo.java new file mode 100644 index 00000000..41de9b52 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/purchaseManagement/domain/bo/XzdPurchaseContractInformationBo.java @@ -0,0 +1,315 @@ +package org.dromara.xzd.contractManagement.purchaseManagement.domain.bo; + +import com.alibaba.excel.annotation.format.DateTimeFormat; +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.time.LocalDate; +import java.util.Date; +import java.util.List; + +import com.fasterxml.jackson.annotation.JsonFormat; +import org.dromara.xzd.contractManagement.purchaseManagement.domain.XzdPurchaseContractInformation; +import org.dromara.xzd.domain.*; + +/** + * 采购合同信息业务对象 xzd_purchase_contract_information + * + * @author Lion Li + * @date 2025-10-13 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = XzdPurchaseContractInformation.class, reverseConvertGenerate = false) +public class XzdPurchaseContractInformationBo extends BaseEntity { + + /** + * 主键ID + */ + private Long id; + + /** + * 合同编码 + */ + private String contractCode; + + /** + * 合同名称 + */ + private String contractName; + + /** + * 单据日期 + */ + private LocalDate documentDate; + + /** + * 合同类型,例如:主要物资采购合同 + */ + private String contractType; + + /** + * 项目 + */ + private Long project; + + /** + * 经营模式 + */ + private String businessModel; + + /** + * 原合同造价 + */ + private Long originalContractCost; + + /** + * 签订日期 + */ + private LocalDate signingDate; + + /** + * 甲方单位 + */ + private Long partyAUnit; + + /** + * 含税合同金额 + */ + private Long taxInclusiveContractAmount; + + /** + * 合同状态,例如:新增 + */ + private String contractStatus; + + /** + * 累计变更金额 + */ + private Long cumulativeChangeAmount; + + /** + * 归档日期 + */ + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private LocalDate filingDate; + + /** + * 管理组织 + */ + private Long managementOrganization; + + /** + * 开票单位(支持搜索,必填) + */ + private Long invoiceIssuingUnit; + + /** + * 收票单位(支持搜索,必填) + */ + private Long invoiceReceivingUnit; + + /** + * 警示信息 + */ + private String warning; + + /** + * 备注说明 + */ + private String remarks; + + /** + * 支付条款 + */ + private String paymentTerms; + + /** + * 集采模式 + */ + private Long centralizedPurchasingMode; + + /** + * 乙方单位 + */ + private Long partyBUnit; + + /** + * 其他收入合同组织 + */ + private Long otherIncomeContractOrganization; + + /** + * 其他收入合同项目 + */ + private Long otherIncomeContractProject; + + /** + * 其他收入合同类型 + */ + private Long otherIncomeContractType; + + /** + * 是否启用:1-是,0-否 + */ + private Long isEnabled; + + /** + * 大写合同价税合计 + */ + private String capitalizedTaxInclusiveTotal; + + /** + * 签约组织 + */ + private Long signingOrganization; + + /** + * 项目类型 + */ + private String projectType; + + /** + * 项目大类 + */ + private String projectCategory; + + /** + * 丙方单位 + */ + private Long partyCUnit; + + /** + * 丙方代表 + */ + private Long partyCRepresentative; + + /** + * 关联主合同 + */ + private String associatedMainContract; + + /** + * 项目责任人 + */ + private Long projectLeader; + + /** + * wbs + */ + private String wbs; + + /** + * 是否用印:1-是,0-否 + */ + private Long isSeal; + + /** + * 是否需备案:1-是,0-否 + */ + private Long needFiling; + + /** + * 备案状态,例如:未备案 + */ + private String filingStatus; + + /** + * 备案时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private LocalDate filingTime; + + /** + * 预算分类,例如:计划成本 + */ + private Long budgetClassification; + + /** + * 是否为固定单价合同:1-是,0-否 + */ + private Long fixedUnitPriceContract; + + /** + * 是否为总价包干合同:1-是,0-否 + */ + private Long lumpSumContract; + + /** + * 付款额是否不能超支付比例:1-是,0-否 + */ + private Long paymentNotExceedPaymentRatio; + + /** + * 付款额不能超合同额:1-是,0-否 + */ + private Long paymentNotExceedPayment; + + /** + * 付款额不能超合同额支付比例 + */ + private Long paymentNotExceedContractRatio; + + /** + * 预结算/结算额是否不能超合同额:1-是,0-否 + */ + private Long preSettlementNotExceedContract; + + /** + * 预结算/结算额不能超合同额比例 + */ + private Long preSettlementNotExceedContractRatio; + + /** + * 文件ID + */ + private String fileId; + + /** + * 备注 + */ + private String remark; + + /** + * 审核状态 + */ + private String auditStatus; + + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private LocalDate startDate; + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private LocalDate endDate; + + + /** + * 预收款项 + */ + private List yskx; + + /** + * 扣款与奖励项 + */ + private List kkyjlx; + + /** + * 合同条款 + */ + private List httk; + + /** + * 支付条款 + */ + private List zftk; + + /** + * 合同主要条款约定 + */ + private XzdContractDepositInfo htzytkyd; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/purchaseManagement/domain/vo/XzdPurchaseContractInformationVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/purchaseManagement/domain/vo/XzdPurchaseContractInformationVo.java new file mode 100644 index 00000000..1d5b8bcc --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/purchaseManagement/domain/vo/XzdPurchaseContractInformationVo.java @@ -0,0 +1,447 @@ +package org.dromara.xzd.contractManagement.purchaseManagement.domain.vo; + +import java.time.LocalDate; +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +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 org.dromara.common.translation.annotation.Translation; +import org.dromara.common.translation.constant.TransConstant; +import org.dromara.xzd.contractManagement.purchaseManagement.domain.XzdPurchaseContractInformation; +import org.dromara.xzd.domain.*; + +import java.io.Serial; +import java.io.Serializable; +import java.util.Date; +import java.util.List; + + +/** + * 采购合同信息视图对象 xzd_purchase_contract_information + * + * @author Lion Li + * @date 2025-10-13 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = XzdPurchaseContractInformation.class) +public class XzdPurchaseContractInformationVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键ID + */ + @ExcelProperty(value = "主键ID") + private Long id; + + /** + * 合同编码 + */ + @ExcelProperty(value = "合同编码") + private String contractCode; + + /** + * 合同名称 + */ + @ExcelProperty(value = "合同名称") + private String contractName; + + /** + * 单据日期 + */ + @ExcelProperty(value = "单据日期") + private LocalDate documentDate; + + /** + * 合同类型,例如:主要物资采购合同 + */ + @ExcelProperty(value = "合同类型,例如:主要物资采购合同") + private String contractType; + + /** + * 项目 + */ + @ExcelProperty(value = "项目") + private Long project; + + + /** + * 项目名称 + */ + @ExcelProperty(value = "项目名称") + private String projectName; + + + /** + * 经营模式 + */ + @ExcelProperty(value = "经营模式") + private String businessModel; + + /** + * 原合同造价 + */ + @ExcelProperty(value = "原合同造价") + private Long originalContractCost; + + /** + * 签订日期 + */ + @ExcelProperty(value = "签订日期") + private LocalDate signingDate; + + /** + * 甲方单位 + */ + @ExcelProperty(value = "甲方单位") + private Long partyAUnit; + + /** + * 甲方单位名称 + */ + @ExcelProperty(value = "甲方单位名称") + private String partyAUnitName; + + /** + * 含税合同金额 + */ + @ExcelProperty(value = "含税合同金额") + private Long taxInclusiveContractAmount; + + /** + * 合同状态,例如:新增 + */ + @ExcelProperty(value = "合同状态,例如:新增") + private String contractStatus; + + /** + * 累计变更金额 + */ + @ExcelProperty(value = "累计变更金额") + private Long cumulativeChangeAmount; + + /** + * 归档日期 + */ + @ExcelProperty(value = "归档日期") + private LocalDate filingDate; + + /** + * 管理组织 + */ + @ExcelProperty(value = "管理组织") + private Long managementOrganization; + + /** + * 管理组织名称 + */ + @ExcelProperty(value = "管理组织名称") + private String managementOrganizationName; + + /** + * 开票单位(支持搜索,必填) + */ + @ExcelProperty(value = "开票单位", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "支=持搜索,必填") + private Long invoiceIssuingUnit; + + /** + * 开票单位名称 + */ + @ExcelProperty(value = "开票单位名称", converter = ExcelDictConvert.class) + private String invoiceIssuingUnitName; + + /** + * 收票单位 + */ + @ExcelProperty(value = "收票单位", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "支=持搜索,必填") + private Long invoiceReceivingUnit; + + /** + * 收票单位名称 + */ + @ExcelProperty(value = "收票单位名称", converter = ExcelDictConvert.class) + private String invoiceReceivingUnitName; + + /** + * 警示信息 + */ + @ExcelProperty(value = "警示信息") + private String warning; + + /** + * 备注说明 + */ + @ExcelProperty(value = "备注说明") + private String remarks; + + /** + * 支付条款 + */ + @ExcelProperty(value = "支付条款") + private String paymentTerms; + + /** + * 集采模式 + */ + @ExcelProperty(value = "集采模式") + private Long centralizedPurchasingMode; + + /** + * 乙方单位 + */ + @ExcelProperty(value = "乙方单位") + private Long partyBUnit; + /** + * 乙方单位名称 + */ + @ExcelProperty(value = "乙方单位名称") + private String partyBUnitName; + + /** + * 其他收入合同组织 + */ + @ExcelProperty(value = "其他收入合同组织") + private Long otherIncomeContractOrganization; + + /** + * 其他收入合同组织名称 + */ + @ExcelProperty(value = "其他收入合同组织名称") + @Translation(type = TransConstant.DEPT_ID_TO_NAME, mapper = "otherIncomeContractOrganization") + private String otherIncomeContractOrganizationName; + + /** + * 其他收入合同项目 + */ + @ExcelProperty(value = "其他收入合同项目") + private Long otherIncomeContractProject; + + /** + * 其他收入合同项目名称 + */ + @ExcelProperty(value = "其他收入合同项目名称") + @Translation(type = TransConstant.DEPT_ID_TO_NAME, mapper = "otherIncomeContractProject") + private String otherIncomeContractProjectName; + + /** + * 其他收入合同类型 + */ + @ExcelProperty(value = "其他收入合同类型") + private Long otherIncomeContractType; + + /** + * 是否启用:1-是,0-否 + */ + @ExcelProperty(value = "是否启用:1-是,0-否") + private Long isEnabled; + + /** + * 大写合同价税合计 + */ + @ExcelProperty(value = "大写合同价税合计") + private String capitalizedTaxInclusiveTotal; + + /** + * 签约组织 + */ + @ExcelProperty(value = "签约组织") + private Long signingOrganization; + + /** + * 签约组织名称 + */ + @ExcelProperty(value = "签约组织名称") + private String signingOrganizationName; + + /** + * 项目类型 + */ + @ExcelProperty(value = "项目类型") + private String projectType; + + /** + * 项目大类 + */ + @ExcelProperty(value = "项目大类") + private String projectCategory; + + /** + * 丙方单位 + */ + @ExcelProperty(value = "丙方单位") + private Long partyCUnit; + + /** + * 丙方单位名称 + */ + @ExcelProperty(value = "丙方单位名称") + private String partyCUnitName; + + + /** + * 丙方代表 + */ + @ExcelProperty(value = "丙方代表") + private Long partyCRepresentative; + + /** + * 丙方代表名称 + */ + @ExcelProperty(value = "丙方代表名称") + @Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "partyCRepresentative") + private String partyCRepresentativeName; + + /** + * 关联主合同 + */ + @ExcelProperty(value = "关联主合同") + private String associatedMainContract; + + /** + * 项目责任人 + */ + @ExcelProperty(value = "项目责任人") + private Long projectLeader; + + + /** + * 项目责任人 + */ + @ExcelProperty(value = "项目责任人") + @Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "projectLeader") + private String projectLeaderName; + + /** + * wbs + */ + @ExcelProperty(value = "wbs") + private String wbs; + + /** + * 是否用印:1-是,0-否 + */ + @ExcelProperty(value = "是否用印:1-是,0-否") + private Long isSeal; + + /** + * 是否需备案:1-是,0-否 + */ + @ExcelProperty(value = "是否需备案:1-是,0-否") + private Long needFiling; + + /** + * 备案状态,例如:未备案 + */ + @ExcelProperty(value = "备案状态,例如:未备案") + private String filingStatus; + + /** + * 备案时间 + */ + @ExcelProperty(value = "备案时间") + private LocalDate filingTime; + + /** + * 预算分类,例如:计划成本 + */ + @ExcelProperty(value = "预算分类,例如:计划成本") + private Long budgetClassification; + + /** + * 是否为固定单价合同:1-是,0-否 + */ + @ExcelProperty(value = "是否为固定单价合同:1-是,0-否") + private Long fixedUnitPriceContract; + + /** + * 是否为总价包干合同:1-是,0-否 + */ + @ExcelProperty(value = "是否为总价包干合同:1-是,0-否") + private Long lumpSumContract; + + /** + * 付款额是否不能超支付比例:1-是,0-否 + */ + @ExcelProperty(value = "付款额是否不能超支付比例:1-是,0-否") + private Long paymentNotExceedPaymentRatio; + + /** + * 付款额不能超合同额:1-是,0-否 + */ + @ExcelProperty(value = "付款额不能超合同额:1-是,0-否") + private Long paymentNotExceedPayment; + + /** + * 付款额不能超合同额支付比例 + */ + @ExcelProperty(value = "付款额不能超合同额支付比例") + private Long paymentNotExceedContractRatio; + + /** + * 预结算/结算额是否不能超合同额:1-是,0-否 + */ + @ExcelProperty(value = "预结算/结算额是否不能超合同额:1-是,0-否") + private Long preSettlementNotExceedContract; + + /** + * 预结算/结算额不能超合同额比例 + */ + @ExcelProperty(value = "预结算/结算额不能超合同额比例") + private Long preSettlementNotExceedContractRatio; + + /** + * 文件ID + */ + @ExcelProperty(value = "文件ID") + private String fileId; + + /** + * 备注 + */ + @ExcelProperty(value = "备注") + private String remark; + + /** + * 审核状态 + */ + @ExcelProperty(value = "审核状态") + private String auditStatus; + + + /** + * 预收款项 + */ + private List yskx; + + /** + * 扣款与奖励项 + */ + private List kkyjlx; + + /** + * 合同条款 + */ + private List httk; + + /** + * 支付条款 + */ + private List zftk; + + /** + * 合同主要条款约定 + */ + private XzdContractDepositInfo htzytkyd; + + + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/purchaseManagement/mapper/XzdPurchaseContractInformationMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/purchaseManagement/mapper/XzdPurchaseContractInformationMapper.java new file mode 100644 index 00000000..b197f12b --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/purchaseManagement/mapper/XzdPurchaseContractInformationMapper.java @@ -0,0 +1,16 @@ +package org.dromara.xzd.contractManagement.purchaseManagement.mapper; + + +import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; +import org.dromara.xzd.contractManagement.purchaseManagement.domain.XzdPurchaseContractInformation; +import org.dromara.xzd.contractManagement.purchaseManagement.domain.vo.XzdPurchaseContractInformationVo; + +/** + * 采购合同信息Mapper接口 + * + * @author Lion Li + * @date 2025-10-13 + */ +public interface XzdPurchaseContractInformationMapper extends BaseMapperPlus { + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/purchaseManagement/service/IXzdPurchaseContractInformationService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/purchaseManagement/service/IXzdPurchaseContractInformationService.java new file mode 100644 index 00000000..5bec8c1c --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/purchaseManagement/service/IXzdPurchaseContractInformationService.java @@ -0,0 +1,72 @@ +package org.dromara.xzd.contractManagement.purchaseManagement.service; + + +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; + +import com.baomidou.mybatisplus.extension.service.IService; +import org.dromara.xzd.contractManagement.purchaseManagement.domain.XzdPurchaseContractInformation; +import org.dromara.xzd.contractManagement.purchaseManagement.domain.bo.XzdPurchaseContractInformationBo; +import org.dromara.xzd.contractManagement.purchaseManagement.domain.vo.XzdPurchaseContractInformationVo; + +import java.util.Collection; +import java.util.List; + +/** + * 采购合同信息Service接口 + * + * @author Lion Li + * @date 2025-10-13 + */ +public interface IXzdPurchaseContractInformationService extends IService{ + + /** + * 查询采购合同信息 + * + * @param id 主键 + * @return 采购合同信息 + */ + XzdPurchaseContractInformationVo queryById(Long id); + + /** + * 分页查询采购合同信息列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 采购合同信息分页列表 + */ + TableDataInfo queryPageList(XzdPurchaseContractInformationBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的采购合同信息列表 + * + * @param bo 查询条件 + * @return 采购合同信息列表 + */ + List queryList(XzdPurchaseContractInformationBo bo); + + /** + * 新增采购合同信息 + * + * @param bo 采购合同信息 + * @return 是否新增成功 + */ + Boolean insertByBo(XzdPurchaseContractInformationBo bo); + + /** + * 修改采购合同信息 + * + * @param bo 采购合同信息 + * @return 是否修改成功 + */ + Boolean updateByBo(XzdPurchaseContractInformationBo 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/contractManagement/purchaseManagement/service/impl/XzdPurchaseContractInformationServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/purchaseManagement/service/impl/XzdPurchaseContractInformationServiceImpl.java new file mode 100644 index 00000000..260c1433 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/contractManagement/purchaseManagement/service/impl/XzdPurchaseContractInformationServiceImpl.java @@ -0,0 +1,459 @@ +package org.dromara.xzd.contractManagement.purchaseManagement.service.impl; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import io.github.linpeilie.annotations.AutoMapper; +import org.dromara.common.core.domain.R; +import org.dromara.common.core.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.system.service.impl.SysOssServiceImpl; +import org.dromara.xzd.biddingManagement.biaoqianlixiang.domain.XzdBidPreProject; +import org.dromara.xzd.contractManagement.purchaseManagement.domain.XzdPurchaseContractInformation; +import org.dromara.xzd.contractManagement.purchaseManagement.domain.bo.XzdPurchaseContractInformationBo; +import org.dromara.xzd.contractManagement.purchaseManagement.domain.vo.XzdPurchaseContractInformationVo; +import org.dromara.xzd.contractManagement.purchaseManagement.mapper.XzdPurchaseContractInformationMapper; +import org.dromara.xzd.contractManagement.purchaseManagement.service.IXzdPurchaseContractInformationService; +import org.dromara.xzd.domain.*; +import org.dromara.xzd.domain.dto.QuerCorrespondentDto; +import org.dromara.xzd.domain.vo.XzdContractDetailsVo; +import org.dromara.xzd.domain.vo.XzdProjectVo; +import org.dromara.xzd.domain.vo.XzdSupplierInfoVo; +import org.dromara.xzd.enums.XzdClassEnum; +import org.dromara.xzd.enums.ZxdEnum; +import org.dromara.xzd.service.IXzdContractAdvanceInfoService; +import org.dromara.xzd.service.IXzdContractClauseService; +import org.dromara.xzd.service.IXzdCorrespondentList; +import org.dromara.xzd.service.IXzdDeductionItemsService; +import org.dromara.xzd.service.impl.*; +import org.dromara.xzd.utilS.AreaUtil; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + + +import java.time.LocalDate; +import java.util.*; + +/** + * 采购合同信息Service业务层处理 + * + * @author Lion Li + * @date 2025-10-13 + */ +@RequiredArgsConstructor +@Service +public class XzdPurchaseContractInformationServiceImpl extends ServiceImpl implements IXzdPurchaseContractInformationService { + + private final XzdPurchaseContractInformationMapper baseMapper; + + + + @Autowired + private XzdContractAdvanceInfoServiceImpl xzdContractAdvanceInfoService; + @Autowired + private XzdDeductionItemsServiceImpl xzdDeductionItemsService; + @Autowired + private XzdContractClauseServiceImpl xzdContractClauseService; + @Autowired + private XzdSettlementRulesServiceImpl xzdSettlementRulesService; + @Autowired + private XzdContractDepositInfoServiceImpl xzdContractDepositInfoService; + + @Autowired + private XzdProjectServiceImpl xzdProjectService; + @Autowired + private IXzdCorrespondentList iXzdCorrespondentList; + @Autowired + private XzdSupplierInfoServiceImpl xzdSupplierInfoService; + @Autowired + private XzdBusinessSealServiceImpl xzdBusinessSealService; + @Autowired + private SysOssServiceImpl sysOssService; + + + private final IXzdContractAdvanceInfoService iXzdContractAdvanceInfoService; + + private final IXzdDeductionItemsService iXzdDeductionItemsService; + + private final IXzdContractClauseService iXzdContractClauseService; + + private final AreaUtil areaUtil; + + /** + * 查询采购合同信息 + * + * @param id 主键 + * @return 采购合同信息 + */ + @Override + public XzdPurchaseContractInformationVo queryById(Long id){ + + XzdPurchaseContractInformationVo xzdPurchaseContractInformationVo = baseMapper.selectVoById(id); + + List informationVo = List.of(xzdPurchaseContractInformationVo); + +// 装填数据 + setValue(informationVo); + + + return informationVo.getFirst(); + } + + /** + * 分页查询采购合同信息列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 采购合同信息分页列表 + */ + @Override + public TableDataInfo queryPageList(XzdPurchaseContractInformationBo bo, PageQuery pageQuery) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); + setValue(result.getRecords()); + return TableDataInfo.build(result); + } + + /** + * 查询符合条件的采购合同信息列表 + * + * @param bo 查询条件 + * @return 采购合同信息列表 + */ + @Override + public List queryList(XzdPurchaseContractInformationBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private LambdaQueryWrapper buildQueryWrapper(XzdPurchaseContractInformationBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.orderByDesc(XzdPurchaseContractInformation::getId); + lqw.eq(StringUtils.isNotBlank(bo.getContractCode()), XzdPurchaseContractInformation::getContractCode, bo.getContractCode()); + lqw.like(StringUtils.isNotBlank(bo.getContractName()), XzdPurchaseContractInformation::getContractName, bo.getContractName()); + lqw.eq(bo.getDocumentDate() != null, XzdPurchaseContractInformation::getDocumentDate, bo.getDocumentDate()); + lqw.ge(bo.getStartDate() != null, XzdPurchaseContractInformation::getDocumentDate, bo.getStartDate()); + lqw.le(bo.getEndDate() != null, XzdPurchaseContractInformation::getDocumentDate, bo.getEndDate()); + + + + lqw.eq(StringUtils.isNotBlank(bo.getContractType()), XzdPurchaseContractInformation::getContractType, bo.getContractType()); + lqw.eq(bo.getProject() != null, XzdPurchaseContractInformation::getProject, bo.getProject()); + lqw.eq(StringUtils.isNotBlank(bo.getBusinessModel()), XzdPurchaseContractInformation::getBusinessModel, bo.getBusinessModel()); + lqw.eq(bo.getOriginalContractCost() != null, XzdPurchaseContractInformation::getOriginalContractCost, bo.getOriginalContractCost()); + lqw.eq(bo.getSigningDate() != null, XzdPurchaseContractInformation::getSigningDate, bo.getSigningDate()); + lqw.eq(bo.getPartyAUnit() != null, XzdPurchaseContractInformation::getPartyAUnit, bo.getPartyAUnit()); + lqw.eq(bo.getTaxInclusiveContractAmount() != null, XzdPurchaseContractInformation::getTaxInclusiveContractAmount, bo.getTaxInclusiveContractAmount()); + lqw.eq(StringUtils.isNotBlank(bo.getContractStatus()), XzdPurchaseContractInformation::getContractStatus, bo.getContractStatus()); + lqw.eq(bo.getCumulativeChangeAmount() != null, XzdPurchaseContractInformation::getCumulativeChangeAmount, bo.getCumulativeChangeAmount()); + lqw.eq(bo.getFilingDate() != null, XzdPurchaseContractInformation::getFilingDate, bo.getFilingDate()); + lqw.eq(bo.getManagementOrganization() != null, XzdPurchaseContractInformation::getManagementOrganization, bo.getManagementOrganization()); + lqw.eq(bo.getInvoiceIssuingUnit() != null, XzdPurchaseContractInformation::getInvoiceIssuingUnit, bo.getInvoiceIssuingUnit()); + lqw.eq(bo.getInvoiceReceivingUnit() != null, XzdPurchaseContractInformation::getInvoiceReceivingUnit, bo.getInvoiceReceivingUnit()); + lqw.eq(StringUtils.isNotBlank(bo.getWarning()), XzdPurchaseContractInformation::getWarning, bo.getWarning()); + lqw.eq(StringUtils.isNotBlank(bo.getRemarks()), XzdPurchaseContractInformation::getRemarks, bo.getRemarks()); + lqw.eq(StringUtils.isNotBlank(bo.getPaymentTerms()), XzdPurchaseContractInformation::getPaymentTerms, bo.getPaymentTerms()); + lqw.eq(bo.getCentralizedPurchasingMode() != null, XzdPurchaseContractInformation::getCentralizedPurchasingMode, bo.getCentralizedPurchasingMode()); + lqw.eq(bo.getPartyBUnit() != null, XzdPurchaseContractInformation::getPartyBUnit, bo.getPartyBUnit()); + lqw.eq(bo.getOtherIncomeContractOrganization() != null, XzdPurchaseContractInformation::getOtherIncomeContractOrganization, bo.getOtherIncomeContractOrganization()); + lqw.eq(bo.getOtherIncomeContractProject() != null, XzdPurchaseContractInformation::getOtherIncomeContractProject, bo.getOtherIncomeContractProject()); + lqw.eq(bo.getOtherIncomeContractType() != null, XzdPurchaseContractInformation::getOtherIncomeContractType, bo.getOtherIncomeContractType()); + lqw.eq(bo.getIsEnabled() != null, XzdPurchaseContractInformation::getIsEnabled, bo.getIsEnabled()); + lqw.eq(StringUtils.isNotBlank(bo.getCapitalizedTaxInclusiveTotal()), XzdPurchaseContractInformation::getCapitalizedTaxInclusiveTotal, bo.getCapitalizedTaxInclusiveTotal()); + lqw.eq(bo.getSigningOrganization() != null, XzdPurchaseContractInformation::getSigningOrganization, bo.getSigningOrganization()); + lqw.eq(StringUtils.isNotBlank(bo.getProjectType()), XzdPurchaseContractInformation::getProjectType, bo.getProjectType()); + lqw.eq(StringUtils.isNotBlank(bo.getProjectCategory()), XzdPurchaseContractInformation::getProjectCategory, bo.getProjectCategory()); + lqw.eq(bo.getPartyCUnit() != null, XzdPurchaseContractInformation::getPartyCUnit, bo.getPartyCUnit()); + lqw.eq(bo.getPartyCRepresentative() != null, XzdPurchaseContractInformation::getPartyCRepresentative, bo.getPartyCRepresentative()); + lqw.eq(StringUtils.isNotBlank(bo.getAssociatedMainContract()), XzdPurchaseContractInformation::getAssociatedMainContract, bo.getAssociatedMainContract()); + lqw.eq(bo.getProjectLeader() != null, XzdPurchaseContractInformation::getProjectLeader, bo.getProjectLeader()); + lqw.eq(StringUtils.isNotBlank(bo.getWbs()), XzdPurchaseContractInformation::getWbs, bo.getWbs()); + lqw.eq(bo.getIsSeal() != null, XzdPurchaseContractInformation::getIsSeal, bo.getIsSeal()); + lqw.eq(bo.getNeedFiling() != null, XzdPurchaseContractInformation::getNeedFiling, bo.getNeedFiling()); + lqw.eq(StringUtils.isNotBlank(bo.getFilingStatus()), XzdPurchaseContractInformation::getFilingStatus, bo.getFilingStatus()); + lqw.eq(bo.getFilingTime() != null, XzdPurchaseContractInformation::getFilingTime, bo.getFilingTime()); + lqw.eq(bo.getBudgetClassification() != null, XzdPurchaseContractInformation::getBudgetClassification, bo.getBudgetClassification()); + lqw.eq(bo.getFixedUnitPriceContract() != null, XzdPurchaseContractInformation::getFixedUnitPriceContract, bo.getFixedUnitPriceContract()); + lqw.eq(bo.getLumpSumContract() != null, XzdPurchaseContractInformation::getLumpSumContract, bo.getLumpSumContract()); + lqw.eq(bo.getPaymentNotExceedPaymentRatio() != null, XzdPurchaseContractInformation::getPaymentNotExceedPaymentRatio, bo.getPaymentNotExceedPaymentRatio()); + lqw.eq(bo.getPaymentNotExceedPayment() != null, XzdPurchaseContractInformation::getPaymentNotExceedPayment, bo.getPaymentNotExceedPayment()); + lqw.eq(bo.getPaymentNotExceedContractRatio() != null, XzdPurchaseContractInformation::getPaymentNotExceedContractRatio, bo.getPaymentNotExceedContractRatio()); + lqw.eq(bo.getPreSettlementNotExceedContract() != null, XzdPurchaseContractInformation::getPreSettlementNotExceedContract, bo.getPreSettlementNotExceedContract()); + lqw.eq(bo.getPreSettlementNotExceedContractRatio() != null, XzdPurchaseContractInformation::getPreSettlementNotExceedContractRatio, bo.getPreSettlementNotExceedContractRatio()); + lqw.eq(StringUtils.isNotBlank(bo.getFileId()), XzdPurchaseContractInformation::getFileId, bo.getFileId()); + lqw.eq(StringUtils.isNotBlank(bo.getAuditStatus()), XzdPurchaseContractInformation::getAuditStatus, bo.getAuditStatus()); + return lqw; + } + + /** + * 新增采购合同信息 + * + * @param bo 采购合同信息 + * @return 是否新增成功 + */ + @Override + public Boolean insertByBo(XzdPurchaseContractInformationBo bo) { + XzdPurchaseContractInformation add = MapstructUtils.convert(bo, XzdPurchaseContractInformation.class); + validEntityBeforeSave(add); + Long l = baseMapper.selectCount(new LambdaQueryWrapper().gt(XzdPurchaseContractInformation::getCreateTime, LocalDate.now())); + String s = areaUtil.generateDateBasedNumberByY(); + add.setContractCode(ZxdEnum.PURCHASE_PREFIX.getTypeValue()+"-"+s+"-"+(l+1)); + boolean flag = baseMapper.insert(add) > 0; + String tableName = XzdClassEnum.PURCHASE_CONTRACT_INFORMATION.getClassName(); + //合同文本-预收款项 + for (XzdContractAdvanceInfo yskx : bo.getYskx()) { + yskx.setTableName(tableName); + yskx.setContractDetailsId(add.getId()); + } + xzdContractAdvanceInfoService.saveBatch(bo.getYskx()); + + //合同条款-扣款与奖励项 + for (XzdDeductionItems kkyjlx : bo.getKkyjlx()) { + kkyjlx.setTableName(tableName); + kkyjlx.setContractDetailsId(add.getId()); + } + xzdDeductionItemsService.saveBatch(bo.getKkyjlx()); + + //合同条款-合同条款 + for (XzdContractClause clause : bo.getHttk()) { + clause.setTableName(tableName); + clause.setContractDetailsId(add.getId()); + } + xzdContractClauseService.saveBatch(bo.getHttk()); + + //支付条款 + for (XzdSettlementRules clause : bo.getZftk()) { + clause.setContractDetailsId(add.getId()); + } + xzdSettlementRulesService.saveBatch(bo.getZftk()); + + //合同主要条款约定 + bo.getHtzytkyd().setTableName(tableName); + bo.getHtzytkyd().setContractDetailsId(add.getId()); + + xzdContractDepositInfoService.save(bo.getHtzytkyd()); + + return flag; + } + + /** + * 修改采购合同信息 + * + * @param bo 采购合同信息 + * @return 是否修改成功 + */ + @Override + public Boolean updateByBo(XzdPurchaseContractInformationBo bo) { + XzdPurchaseContractInformation update = MapstructUtils.convert(bo, XzdPurchaseContractInformation.class); + validEntityBeforeSave(update); + + /** + * 预收款项 优先删除数据在添加 + */ + String tableName = XzdClassEnum.PURCHASE_CONTRACT_INFORMATION.getClassName(); + HashMap hashMap = new HashMap<>(); + hashMap.put("contract_details_id", bo.getId()); + List yskx = bo.getYskx(); + iXzdContractAdvanceInfoService.getBaseMapper().deleteByMap(hashMap); + if (yskx != null){ + yskx.forEach(item -> { + item.setTableName(tableName); + item.setContractDetailsId(bo.getId()); + }); + iXzdContractAdvanceInfoService.saveBatch(yskx); + } + /** + * 扣款与奖励项 + */ + List kkyjlx = bo.getKkyjlx(); + iXzdDeductionItemsService.getBaseMapper().deleteByMap(hashMap); + if(kkyjlx != null){ + kkyjlx.forEach(item -> { + item.setTableName(tableName); + item.setContractDetailsId(bo.getId()); + }); + iXzdDeductionItemsService.saveBatch(kkyjlx); + } + /** + * 合同条款 + */ + List httk = bo.getHttk(); + iXzdContractClauseService.getBaseMapper().deleteByMap(hashMap); + if (httk != null){ + httk.forEach(item -> { + item.setTableName(tableName); + item.setContractDetailsId(bo.getId()); + }); + iXzdContractClauseService.saveBatch(httk); + } +// 支付条款 + List zftk = bo.getZftk(); + xzdSettlementRulesService.getBaseMapper().deleteByMap(hashMap); + if(zftk != null){ + zftk.forEach(item -> + item.setContractDetailsId(bo.getId())); + } + xzdSettlementRulesService.saveOrUpdateBatch(bo.getZftk()); + + + + bo.getHtzytkyd().setTableName(XzdClassEnum.PURCHASE_CONTRACT_INFORMATION.getClassName()); + xzdContractDepositInfoService.saveOrUpdate(bo.getHtzytkyd()); + + + return baseMapper.updateById(update) > 0; + } + + /** + * 保存前的数据校验 + */ + private void validEntityBeforeSave(XzdPurchaseContractInformation entity){ + //TODO 做一些数据校验,如唯一约束 + } + + /** + * 校验并批量删除采购合同信息信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + @Override + public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { + if(isValid){ + + } + for (Long id : ids) { + XzdPurchaseContractInformationVo vo = baseMapper.selectVoById(id); + if (vo != null){ + //删除附件 + if (vo.getFileId()!= null && !vo.getFileId().isEmpty()){ + List deleteIds = Arrays.stream(vo.getFileId().split(",")).map(Long::valueOf).toList(); + if (!deleteIds.isEmpty()) { + sysOssService.deleteWithValidByIds(deleteIds, false); + } + } + + + + } + + //合同文本-预收款项 + LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); + lambdaQueryWrapper.in(XzdContractAdvanceInfo::getContractDetailsId, ids); + xzdContractAdvanceInfoService.remove(lambdaQueryWrapper); + + //合同条款-扣款与奖励项 + LambdaQueryWrapper lambdaQueryWrapper1 = new LambdaQueryWrapper<>(); + lambdaQueryWrapper1.in(XzdDeductionItems::getContractDetailsId, ids); + xzdDeductionItemsService.remove(lambdaQueryWrapper1); + + //合同条款-合同条款 + LambdaQueryWrapper lambdaQueryWrapper2 = new LambdaQueryWrapper<>(); + lambdaQueryWrapper2.in(XzdContractClause::getContractDetailsId, ids); + xzdContractClauseService.remove(lambdaQueryWrapper2); + + //支付条款 + LambdaQueryWrapper lambdaQueryWrapper3 = new LambdaQueryWrapper<>(); + lambdaQueryWrapper3.in(XzdSettlementRules::getContractDetailsId, ids); + xzdSettlementRulesService.remove(lambdaQueryWrapper3); + } + return baseMapper.deleteByIds(ids) > 0; + } + + public void setValue(List infos){ + + for (XzdPurchaseContractInformationVo item : infos) { + + + //项目名称 + if (item.getProject() != null){ + String projectName = xzdProjectService.queryNameById(item.getProject()); + if (projectName != null){ + item.setProjectName(projectName); + } + } + //甲方单位(客户信息列表) + R byid = iXzdCorrespondentList.getCustomerByid(item.getPartyAUnit()); + if (byid!=null){ + if (byid.getData().getXzdCustomerinformation() != null){ + item.setPartyAUnitName(byid.getData().getXzdCustomerinformation().getUnitName()); + } + } + //乙方单位(供应商信息列表) + if (item.getPartyBUnit() != null){ + String unitName = xzdSupplierInfoService.queryNameById(item.getPartyBUnit()); + if (unitName != null){ + item.setPartyBUnitName(unitName); + } + } + //管理组织(供应商) + String unitName = xzdSupplierInfoService.queryNameById(item.getPartyBUnit()); + + if (unitName != null){ + item.setManagementOrganizationName(unitName); + } + //开票单位名称(供应商名称) + String unitName1 = xzdSupplierInfoService.queryNameById(item.getInvoiceIssuingUnit()); + if (unitName1 != null){ + item.setInvoiceIssuingUnitName(unitName1); + } + //收票单位名称(客户名称) + R byid2 = iXzdCorrespondentList.getCustomerByid(item.getInvoiceReceivingUnit()); + if (byid2!=null){ + if (byid2.getData().getXzdCustomerinformation() != null){ + item.setInvoiceReceivingUnitName(byid2.getData().getXzdCustomerinformation().getUnitName()); + } + } + //签约组织(供应商) + String unitName2 = xzdSupplierInfoService.queryNameById(item.getInvoiceIssuingUnit()); + if (unitName2!= null){ + item.setSigningOrganizationName(unitName2); + } + //丙方单位(供应商) + String unitName3 = xzdSupplierInfoService.queryNameById(item.getInvoiceIssuingUnit()); + + if (unitName3!= null){ + item.setPartyCUnitName(unitName3); + } + //合同文本-预收款项 + LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); + lambdaQueryWrapper.eq(XzdContractAdvanceInfo::getContractDetailsId, item.getId()); + List advanceInfos = xzdContractAdvanceInfoService.list(lambdaQueryWrapper); + item.setYskx(advanceInfos); + + //合同条款-扣款与奖励项 + LambdaQueryWrapper lambdaQueryWrapper1 = new LambdaQueryWrapper<>(); + lambdaQueryWrapper1.eq(XzdDeductionItems::getContractDetailsId, item.getId()); + List list = xzdDeductionItemsService.list(lambdaQueryWrapper1); + item.setKkyjlx(list); + + //合同条款-合同条款 + LambdaQueryWrapper lambdaQueryWrapper2 = new LambdaQueryWrapper<>(); + lambdaQueryWrapper2.eq(XzdContractClause::getContractDetailsId, item.getId()); + List list1 = xzdContractClauseService.list(lambdaQueryWrapper2); + item.setHttk(list1); + + //支付条款 + LambdaQueryWrapper lambdaQueryWrapper3 = new LambdaQueryWrapper<>(); + lambdaQueryWrapper3.eq(XzdSettlementRules::getContractDetailsId, item.getId()); + List list2 = xzdSettlementRulesService.list(lambdaQueryWrapper3); + item.setZftk(list2); + + //合同文本-合同主要条款约定 + LambdaQueryWrapper lambdaQueryWrapper4 = new LambdaQueryWrapper<>(); + lambdaQueryWrapper4.eq(XzdContractDepositInfo::getContractDetailsId, item.getId()); + XzdContractDepositInfo list3 = xzdContractDepositInfoService.getOne(lambdaQueryWrapper4); + item.setHtzytkyd(list3); + + + } + + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/backletter/controller/XzdGuaranteeChangeInfoController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/backletter/controller/XzdGuaranteeChangeInfoController.java new file mode 100644 index 00000000..5b5aef8a --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/backletter/controller/XzdGuaranteeChangeInfoController.java @@ -0,0 +1,105 @@ +package org.dromara.xzd.deposit.backletter.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.deposit.backletter.domain.vo.XzdGuaranteeChangeInfoVo; +import org.dromara.xzd.deposit.backletter.domain.bo.XzdGuaranteeChangeInfoBo; +import org.dromara.xzd.deposit.backletter.service.IXzdGuaranteeChangeInfoService; +import org.dromara.common.mybatis.core.page.TableDataInfo; + +/** + * 承包合同保函变更 + * + * @author Lion Li + * @date 2025-10-12 + */ +@Validated +@RequiredArgsConstructor +@RestController +@RequestMapping("/backletter/guaranteeChangeInfo") +public class XzdGuaranteeChangeInfoController extends BaseController { + + private final IXzdGuaranteeChangeInfoService xzdGuaranteeChangeInfoService; + + /** + * 查询承包合同保函变更列表 + */ + @SaCheckPermission("backletter:guaranteeChangeInfo:list") + @GetMapping("/list") + public TableDataInfo list(XzdGuaranteeChangeInfoBo bo, PageQuery pageQuery) { + return xzdGuaranteeChangeInfoService.queryPageList(bo, pageQuery); + } + + /** + * 导出承包合同保函变更列表 + */ + @SaCheckPermission("backletter:guaranteeChangeInfo:export") + @Log(title = "承包合同保函变更", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(XzdGuaranteeChangeInfoBo bo, HttpServletResponse response) { + List list = xzdGuaranteeChangeInfoService.queryList(bo); + ExcelUtil.exportExcel(list, "承包合同保函变更", XzdGuaranteeChangeInfoVo.class, response); + } + + /** + * 获取承包合同保函变更详细信息 + * + * @param id 主键 + */ + @SaCheckPermission("backletter:guaranteeChangeInfo:query") + @GetMapping("/{id}") + public R getInfo(@NotNull(message = "主键不能为空") + @PathVariable Long id) { + return R.ok(xzdGuaranteeChangeInfoService.queryById(id)); + } + + /** + * 新增承包合同保函变更 + */ + @SaCheckPermission("backletter:guaranteeChangeInfo:add") + @Log(title = "承包合同保函变更", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping() + public R add(@Validated(AddGroup.class) @RequestBody XzdGuaranteeChangeInfoBo bo) { + return toAjax(xzdGuaranteeChangeInfoService.insertByBo(bo)); + } + + /** + * 修改承包合同保函变更 + */ + @SaCheckPermission("backletter:guaranteeChangeInfo:edit") + @Log(title = "承包合同保函变更", businessType = BusinessType.UPDATE) + @RepeatSubmit() + @PutMapping() + public R edit(@Validated(EditGroup.class) @RequestBody XzdGuaranteeChangeInfoBo bo) { + return toAjax(xzdGuaranteeChangeInfoService.updateByBo(bo)); + } + + /** + * 删除承包合同保函变更 + * + * @param ids 主键串 + */ + @SaCheckPermission("backletter:guaranteeChangeInfo:remove") + @Log(title = "承包合同保函变更", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public R remove(@NotEmpty(message = "主键不能为空") + @PathVariable Long[] ids) { + return toAjax(xzdGuaranteeChangeInfoService.deleteWithValidByIds(List.of(ids), true)); + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/backletter/domain/XzdGuaranteeChangeInfo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/backletter/domain/XzdGuaranteeChangeInfo.java new file mode 100644 index 00000000..a4fb0144 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/backletter/domain/XzdGuaranteeChangeInfo.java @@ -0,0 +1,225 @@ +package org.dromara.xzd.deposit.backletter.domain; + +import org.dromara.common.mybatis.core.domain.BaseEntity; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.time.LocalDateTime; +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.io.Serial; + +/** + * 承包合同保函变更对象 xzd_guarantee_change_info + * + * @author Lion Li + * @date 2025-10-12 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("xzd_guarantee_change_info") +public class XzdGuaranteeChangeInfo extends BaseEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * + */ + @TableId(value = "id") + private Long id; + + /** + * 单据引用ID + */ + private Long danjuId; + + /** + * 单据编号 + */ + private String documentNumber; + + /** + * 标题 + */ + private String title; + + /** + * 单据日期 + */ + private LocalDateTime documentDate; + + /** + * 合同保函 + */ + private Long contractGuaranteeId; + + /** + * 工程项目 + */ + private String engineeringProject; + + /** + * 经办人 + */ + private Long handlerId; + + /** + * 变更类型(字典) + */ + private String changeType; + + /** + * 延期日期 + */ + private LocalDateTime extensionDate; + + /** + * 闭卷日期 + */ + private LocalDateTime closedDate; + + /** + * 调整后保函金额 + */ + private Long adjustedGuaranteeAmount; + + /** + * 退还金额 + */ + private Long refundAmount; + + /** + * 变更说明 + */ + private String changeDescription; + + /** + * 备注 + */ + private String remarks; + + /** + * 保函类型(字典) + */ + private String guaranteeType; + + /** + * 保函编号 + */ + private String guaranteeNumber; + + /** + * 保函金额 + */ + private Long guaranteeAmount; + + /** + * 保函百分比 + */ + private Long guaranteePercentage; + + /** + * 申请人 + */ + private String applicant; + + /** + * 申请机构 + */ + private String applicationOrganization; + + /** + * 有无保函格式 + */ + private String hasGuaranteeFormat; + + /** + * 格式是否可改 + */ + private String isFormatChangeable; + + /** + * 开立银行 + */ + private String issuingBank; + + /** + * 开立方式 + */ + private String issuingMethod; + + /** + * 开立日期 + */ + private LocalDateTime issuingDate; + + /** + * 到期日期 + */ + private LocalDateTime dueDate; + + /** + * 担保单位 + */ + private String guaranteeUnit; + + /** + * 受益人 + */ + private String beneficiary; + + /** + * 转开行信息 + */ + private String remittingBankInfo; + + /** + * 反担保到期日期 + */ + private LocalDateTime counterGuaranteeDueDate; + + /** + * 是否减额保函 + */ + private String isReducedGuarantee; + + /** + * 合同编号 + */ + private String contractNumber; + + /** + * 合同名称 + */ + private String contractName; + + /** + * 合同金额 + */ + private Long contractAmount; + + /** + * 甲方单位 + */ + private String partyAUnit; + + /** + * 乙方单位 + */ + private String partyBUnit; + + /** + * 商业模式 + */ + private String businessModel; + + /** + * 文件id(多个逗号分隔) + */ + private String fileId; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/backletter/domain/bo/XzdGuaranteeChangeInfoBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/backletter/domain/bo/XzdGuaranteeChangeInfoBo.java new file mode 100644 index 00000000..35500ffb --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/backletter/domain/bo/XzdGuaranteeChangeInfoBo.java @@ -0,0 +1,229 @@ +package org.dromara.xzd.deposit.backletter.domain.bo; + +import org.dromara.xzd.deposit.backletter.domain.XzdGuaranteeChangeInfo; +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.time.LocalDateTime; +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; + +/** + * 承包合同保函变更业务对象 xzd_guarantee_change_info + * + * @author Lion Li + * @date 2025-10-12 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = XzdGuaranteeChangeInfo.class, reverseConvertGenerate = false) +public class XzdGuaranteeChangeInfoBo extends BaseEntity { + + /** + * + */ + @NotNull(message = "不能为空", groups = { EditGroup.class }) + private Long id; + + /** + * 单据引用ID + */ + private Long danjuId; + + /** + * 单据编号 + */ + private String documentNumber; + + /** + * 标题 + */ + private String title; + + /** + * 单据日期 + */ + private LocalDateTime documentDate; + + /** + * 合同保函 + */ + private Long contractGuaranteeId; + + /** + * 工程项目 + */ + private String engineeringProject; + + /** + * 经办人 + */ + private Long handlerId; + + /** + * 变更类型(字典) + */ + private String changeType; + + /** + * 延期日期 + */ + private LocalDateTime extensionDate; + + /** + * 闭卷日期 + */ + private LocalDateTime closedDate; + + /** + * 调整后保函金额 + */ + private Long adjustedGuaranteeAmount; + + /** + * 退还金额 + */ + private Long refundAmount; + + /** + * 变更说明 + */ + private String changeDescription; + + /** + * 备注 + */ + private String remarks; + + /** + * 保函类型(字典) + */ + private String guaranteeType; + + /** + * 保函编号 + */ + private String guaranteeNumber; + + /** + * 保函金额 + */ + private Long guaranteeAmount; + + /** + * 保函百分比 + */ + private Long guaranteePercentage; + + /** + * 申请人 + */ + private String applicant; + + /** + * 申请机构 + */ + private String applicationOrganization; + + /** + * 有无保函格式 + */ + private String hasGuaranteeFormat; + + /** + * 格式是否可改 + */ + private String isFormatChangeable; + + /** + * 开立银行 + */ + private String issuingBank; + + /** + * 开立方式 + */ + private String issuingMethod; + + /** + * 开立日期 + */ + private LocalDateTime issuingDate; + + /** + * 到期日期 + */ + private LocalDateTime dueDate; + + /** + * 担保单位 + */ + private String guaranteeUnit; + + /** + * 受益人 + */ + private String beneficiary; + + /** + * 转开行信息 + */ + private String remittingBankInfo; + + /** + * 反担保到期日期 + */ + private LocalDateTime counterGuaranteeDueDate; + + /** + * 是否减额保函 + */ + private String isReducedGuarantee; + + /** + * 合同编号 + */ + private String contractNumber; + + /** + * 合同名称 + */ + private String contractName; + + /** + * 合同金额 + */ + private Long contractAmount; + + /** + * 甲方单位 + */ + private String partyAUnit; + + /** + * 乙方单位 + */ + private String partyBUnit; + + /** + * 商业模式 + */ + private String businessModel; + + /** + * 文件id(多个逗号分隔) + */ + private String fileId; + + + private LocalDateTime startTime; + + private LocalDateTime endTime; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/backletter/domain/vo/XzdGuaranteeChangeInfoVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/backletter/domain/vo/XzdGuaranteeChangeInfoVo.java new file mode 100644 index 00000000..edfc2c54 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/backletter/domain/vo/XzdGuaranteeChangeInfoVo.java @@ -0,0 +1,289 @@ +package org.dromara.xzd.deposit.backletter.domain.vo; + +import java.time.LocalDateTime; +import java.util.Date; + +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.TableField; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.dromara.common.translation.annotation.Translation; +import org.dromara.common.translation.constant.TransConstant; +import org.dromara.xzd.deposit.backletter.domain.XzdGuaranteeChangeInfo; +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.util.Date; + + + +/** + * 承包合同保函变更视图对象 xzd_guarantee_change_info + * + * @author Lion Li + * @date 2025-10-12 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = XzdGuaranteeChangeInfo.class) +public class XzdGuaranteeChangeInfoVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * + */ + @ExcelProperty(value = "") + private Long id; + + /** + * 单据引用ID + */ + @ExcelProperty(value = "单据引用ID") + private Long danjuId; + + /** + * 单据编号 + */ + @ExcelProperty(value = "单据编号") + private String documentNumber; + + /** + * 标题 + */ + @ExcelProperty(value = "标题") + private String title; + + /** + * 单据日期 + */ + @ExcelProperty(value = "单据日期") + private LocalDateTime documentDate; + + /** + * 合同保函 + */ + @ExcelProperty(value = "合同保函") + private Long contractGuaranteeId; + + /** + * 工程项目 + */ + @ExcelProperty(value = "工程项目") + private String engineeringProject; + + /** + * 经办人 + */ + @ExcelProperty(value = "经办人") + private Long handlerId; + + /** + * 变更类型(字典) + */ + @ExcelProperty(value = "变更类型", converter = ExcelDictConvert.class) + @ExcelDictFormat(dictType = "xzd_alteration_type") + private String changeType; + + /** + * 延期日期 + */ + @ExcelProperty(value = "延期日期") + private LocalDateTime extensionDate; + + /** + * 闭卷日期 + */ + @ExcelProperty(value = "闭卷日期") + private LocalDateTime closedDate; + + /** + * 调整后保函金额 + */ + @ExcelProperty(value = "调整后保函金额") + private Long adjustedGuaranteeAmount; + + /** + * 退还金额 + */ + @ExcelProperty(value = "退还金额") + private Long refundAmount; + + /** + * 变更说明 + */ + @ExcelProperty(value = "变更说明") + private String changeDescription; + + /** + * 备注 + */ + @ExcelProperty(value = "备注") + private String remarks; + + /** + * 保函类型(字典) + */ + @ExcelProperty(value = "保函类型", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "字=典") + private String guaranteeType; + + /** + * 保函编号 + */ + @ExcelProperty(value = "保函编号") + private String guaranteeNumber; + + /** + * 保函金额 + */ + @ExcelProperty(value = "保函金额") + private Long guaranteeAmount; + + /** + * 保函百分比 + */ + @ExcelProperty(value = "保函百分比") + private Long guaranteePercentage; + + /** + * 申请人 + */ + @ExcelProperty(value = "申请人") + private String applicant; + + /** + * 申请机构 + */ + @ExcelProperty(value = "申请机构") + private String applicationOrganization; + + /** + * 有无保函格式 + */ + @ExcelProperty(value = "有无保函格式") + private String hasGuaranteeFormat; + + /** + * 格式是否可改 + */ + @ExcelProperty(value = "格式是否可改") + private String isFormatChangeable; + + /** + * 开立银行 + */ + @ExcelProperty(value = "开立银行") + private String issuingBank; + + /** + * 开立方式 + */ + @ExcelProperty(value = "开立方式") + private String issuingMethod; + + /** + * 开立日期 + */ + @ExcelProperty(value = "开立日期") + private LocalDateTime issuingDate; + + /** + * 到期日期 + */ + @ExcelProperty(value = "到期日期") + private LocalDateTime dueDate; + + /** + * 担保单位 + */ + @ExcelProperty(value = "担保单位") + private String guaranteeUnit; + + /** + * 受益人 + */ + @ExcelProperty(value = "受益人") + private String beneficiary; + + /** + * 转开行信息 + */ + @ExcelProperty(value = "转开行信息") + private String remittingBankInfo; + + /** + * 反担保到期日期 + */ + @ExcelProperty(value = "反担保到期日期") + private LocalDateTime counterGuaranteeDueDate; + + /** + * 是否减额保函 + */ + @ExcelProperty(value = "是否减额保函") + private String isReducedGuarantee; + + /** + * 合同编号 + */ + @ExcelProperty(value = "合同编号") + private String contractNumber; + + /** + * 合同名称 + */ + @ExcelProperty(value = "合同名称") + private String contractName; + + /** + * 合同金额 + */ + @ExcelProperty(value = "合同金额") + private Long contractAmount; + + /** + * 甲方单位 + */ + @ExcelProperty(value = "甲方单位") + private String partyAUnit; + + /** + * 乙方单位 + */ + @ExcelProperty(value = "乙方单位") + private String partyBUnit; + + /** + * 商业模式 + */ + @ExcelProperty(value = "商业模式") + private String businessModel; + + /** + * 文件id(多个逗号分隔) + */ + @ExcelProperty(value = "文件id", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "多=个逗号分隔") + private String fileId; + + /** + * 创建者 + */ + @TableField(fill = FieldFill.INSERT) + private Long createBy; + + /** + * 创建者姓名 + */ + @Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "createBy") + private String createByName; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/backletter/mapper/XzdGuaranteeChangeInfoMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/backletter/mapper/XzdGuaranteeChangeInfoMapper.java new file mode 100644 index 00000000..c3d0010a --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/backletter/mapper/XzdGuaranteeChangeInfoMapper.java @@ -0,0 +1,15 @@ +package org.dromara.xzd.deposit.backletter.mapper; + +import org.dromara.xzd.deposit.backletter.domain.XzdGuaranteeChangeInfo; +import org.dromara.xzd.deposit.backletter.domain.vo.XzdGuaranteeChangeInfoVo; +import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; + +/** + * 承包合同保函变更Mapper接口 + * + * @author Lion Li + * @date 2025-10-12 + */ +public interface XzdGuaranteeChangeInfoMapper extends BaseMapperPlus { + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/backletter/service/IXzdGuaranteeChangeInfoService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/backletter/service/IXzdGuaranteeChangeInfoService.java new file mode 100644 index 00000000..74152337 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/backletter/service/IXzdGuaranteeChangeInfoService.java @@ -0,0 +1,70 @@ +package org.dromara.xzd.deposit.backletter.service; + +import org.dromara.xzd.deposit.backletter.domain.vo.XzdGuaranteeChangeInfoVo; +import org.dromara.xzd.deposit.backletter.domain.bo.XzdGuaranteeChangeInfoBo; +import org.dromara.xzd.deposit.backletter.domain.XzdGuaranteeChangeInfo; +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-10-12 + */ +public interface IXzdGuaranteeChangeInfoService extends IService{ + + /** + * 查询承包合同保函变更 + * + * @param id 主键 + * @return 承包合同保函变更 + */ + XzdGuaranteeChangeInfoVo queryById(Long id); + + /** + * 分页查询承包合同保函变更列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 承包合同保函变更分页列表 + */ + TableDataInfo queryPageList(XzdGuaranteeChangeInfoBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的承包合同保函变更列表 + * + * @param bo 查询条件 + * @return 承包合同保函变更列表 + */ + List queryList(XzdGuaranteeChangeInfoBo bo); + + /** + * 新增承包合同保函变更 + * + * @param bo 承包合同保函变更 + * @return 是否新增成功 + */ + Boolean insertByBo(XzdGuaranteeChangeInfoBo bo); + + /** + * 修改承包合同保函变更 + * + * @param bo 承包合同保函变更 + * @return 是否修改成功 + */ + Boolean updateByBo(XzdGuaranteeChangeInfoBo 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/deposit/backletter/service/impl/XzdGuaranteeChangeInfoServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/backletter/service/impl/XzdGuaranteeChangeInfoServiceImpl.java new file mode 100644 index 00000000..8f65f3f2 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/backletter/service/impl/XzdGuaranteeChangeInfoServiceImpl.java @@ -0,0 +1,199 @@ +package org.dromara.xzd.deposit.backletter.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +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.system.service.impl.SysOssServiceImpl; +import org.dromara.xzd.biddingManagement.biaoqianlixiang.domain.XzdBidPreProject; +import org.dromara.xzd.biddingManagement.earnestMoneyWithdraw.domain.vo.XzdBidDepositRecoveryVo; +import org.dromara.xzd.utilS.AreaUtil; +import org.springframework.stereotype.Service; +import org.dromara.xzd.deposit.backletter.domain.bo.XzdGuaranteeChangeInfoBo; +import org.dromara.xzd.deposit.backletter.domain.vo.XzdGuaranteeChangeInfoVo; +import org.dromara.xzd.deposit.backletter.domain.XzdGuaranteeChangeInfo; +import org.dromara.xzd.deposit.backletter.mapper.XzdGuaranteeChangeInfoMapper; +import org.dromara.xzd.deposit.backletter.service.IXzdGuaranteeChangeInfoService; + +import java.time.LocalDate; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.Collection; +import java.util.stream.Collectors; + +/** + * 承包合同保函变更Service业务层处理 + * + * @author Lion Li + * @date 2025-10-12 + */ +@RequiredArgsConstructor +@Service +public class XzdGuaranteeChangeInfoServiceImpl extends ServiceImpl implements IXzdGuaranteeChangeInfoService { + + private final XzdGuaranteeChangeInfoMapper baseMapper; + + private final AreaUtil areaUtil; + + private final SysOssServiceImpl sysOssService; + + /** + * 查询承包合同保函变更 + * + * @param id 主键 + * @return 承包合同保函变更 + */ + @Override + public XzdGuaranteeChangeInfoVo queryById(Long id){ + return baseMapper.selectVoById(id); + } + + /** + * 分页查询承包合同保函变更列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 承包合同保函变更分页列表 + */ + @Override + public TableDataInfo queryPageList(XzdGuaranteeChangeInfoBo 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(XzdGuaranteeChangeInfoBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private LambdaQueryWrapper buildQueryWrapper(XzdGuaranteeChangeInfoBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.orderByDesc(XzdGuaranteeChangeInfo::getId); + lqw.eq(bo.getDanjuId() != null, XzdGuaranteeChangeInfo::getDanjuId, bo.getDanjuId()); + lqw.eq(StringUtils.isNotBlank(bo.getDocumentNumber()), XzdGuaranteeChangeInfo::getDocumentNumber, bo.getDocumentNumber()); + lqw.eq(StringUtils.isNotBlank(bo.getTitle()), XzdGuaranteeChangeInfo::getTitle, bo.getTitle()); + lqw.eq(bo.getDocumentDate() != null, XzdGuaranteeChangeInfo::getDocumentDate, bo.getDocumentDate()); + lqw.ge(bo.getStartTime() != null, XzdGuaranteeChangeInfo::getDocumentDate, bo.getStartTime()); + lqw.le(bo.getEndTime() != null, XzdGuaranteeChangeInfo::getDocumentDate, bo.getEndTime()); + + + lqw.eq(bo.getContractGuaranteeId() != null, XzdGuaranteeChangeInfo::getContractGuaranteeId, bo.getContractGuaranteeId()); + lqw.eq(StringUtils.isNotBlank(bo.getEngineeringProject()), XzdGuaranteeChangeInfo::getEngineeringProject, bo.getEngineeringProject()); + lqw.eq(bo.getHandlerId() != null, XzdGuaranteeChangeInfo::getHandlerId, bo.getHandlerId()); + lqw.eq(StringUtils.isNotBlank(bo.getChangeType()), XzdGuaranteeChangeInfo::getChangeType, bo.getChangeType()); + lqw.eq(bo.getExtensionDate() != null, XzdGuaranteeChangeInfo::getExtensionDate, bo.getExtensionDate()); + lqw.eq(bo.getClosedDate() != null, XzdGuaranteeChangeInfo::getClosedDate, bo.getClosedDate()); + lqw.eq(bo.getAdjustedGuaranteeAmount() != null, XzdGuaranteeChangeInfo::getAdjustedGuaranteeAmount, bo.getAdjustedGuaranteeAmount()); + lqw.eq(bo.getRefundAmount() != null, XzdGuaranteeChangeInfo::getRefundAmount, bo.getRefundAmount()); + lqw.eq(StringUtils.isNotBlank(bo.getChangeDescription()), XzdGuaranteeChangeInfo::getChangeDescription, bo.getChangeDescription()); + lqw.eq(StringUtils.isNotBlank(bo.getRemarks()), XzdGuaranteeChangeInfo::getRemarks, bo.getRemarks()); + lqw.eq(StringUtils.isNotBlank(bo.getGuaranteeType()), XzdGuaranteeChangeInfo::getGuaranteeType, bo.getGuaranteeType()); + lqw.eq(StringUtils.isNotBlank(bo.getGuaranteeNumber()), XzdGuaranteeChangeInfo::getGuaranteeNumber, bo.getGuaranteeNumber()); + lqw.eq(bo.getGuaranteeAmount() != null, XzdGuaranteeChangeInfo::getGuaranteeAmount, bo.getGuaranteeAmount()); + lqw.eq(bo.getGuaranteePercentage() != null, XzdGuaranteeChangeInfo::getGuaranteePercentage, bo.getGuaranteePercentage()); + lqw.eq(StringUtils.isNotBlank(bo.getApplicant()), XzdGuaranteeChangeInfo::getApplicant, bo.getApplicant()); + lqw.eq(StringUtils.isNotBlank(bo.getApplicationOrganization()), XzdGuaranteeChangeInfo::getApplicationOrganization, bo.getApplicationOrganization()); + lqw.eq(StringUtils.isNotBlank(bo.getHasGuaranteeFormat()), XzdGuaranteeChangeInfo::getHasGuaranteeFormat, bo.getHasGuaranteeFormat()); + lqw.eq(StringUtils.isNotBlank(bo.getIsFormatChangeable()), XzdGuaranteeChangeInfo::getIsFormatChangeable, bo.getIsFormatChangeable()); + lqw.eq(StringUtils.isNotBlank(bo.getIssuingBank()), XzdGuaranteeChangeInfo::getIssuingBank, bo.getIssuingBank()); + lqw.eq(StringUtils.isNotBlank(bo.getIssuingMethod()), XzdGuaranteeChangeInfo::getIssuingMethod, bo.getIssuingMethod()); + lqw.eq(bo.getIssuingDate() != null, XzdGuaranteeChangeInfo::getIssuingDate, bo.getIssuingDate()); + lqw.eq(bo.getDueDate() != null, XzdGuaranteeChangeInfo::getDueDate, bo.getDueDate()); + lqw.eq(StringUtils.isNotBlank(bo.getGuaranteeUnit()), XzdGuaranteeChangeInfo::getGuaranteeUnit, bo.getGuaranteeUnit()); + lqw.eq(StringUtils.isNotBlank(bo.getBeneficiary()), XzdGuaranteeChangeInfo::getBeneficiary, bo.getBeneficiary()); + lqw.eq(StringUtils.isNotBlank(bo.getRemittingBankInfo()), XzdGuaranteeChangeInfo::getRemittingBankInfo, bo.getRemittingBankInfo()); + lqw.eq(bo.getCounterGuaranteeDueDate() != null, XzdGuaranteeChangeInfo::getCounterGuaranteeDueDate, bo.getCounterGuaranteeDueDate()); + lqw.eq(StringUtils.isNotBlank(bo.getIsReducedGuarantee()), XzdGuaranteeChangeInfo::getIsReducedGuarantee, bo.getIsReducedGuarantee()); + lqw.eq(StringUtils.isNotBlank(bo.getContractNumber()), XzdGuaranteeChangeInfo::getContractNumber, bo.getContractNumber()); + lqw.like(StringUtils.isNotBlank(bo.getContractName()), XzdGuaranteeChangeInfo::getContractName, bo.getContractName()); + lqw.eq(bo.getContractAmount() != null, XzdGuaranteeChangeInfo::getContractAmount, bo.getContractAmount()); + lqw.eq(StringUtils.isNotBlank(bo.getPartyAUnit()), XzdGuaranteeChangeInfo::getPartyAUnit, bo.getPartyAUnit()); + lqw.eq(StringUtils.isNotBlank(bo.getPartyBUnit()), XzdGuaranteeChangeInfo::getPartyBUnit, bo.getPartyBUnit()); + lqw.eq(StringUtils.isNotBlank(bo.getBusinessModel()), XzdGuaranteeChangeInfo::getBusinessModel, bo.getBusinessModel()); + lqw.eq(StringUtils.isNotBlank(bo.getFileId()), XzdGuaranteeChangeInfo::getFileId, bo.getFileId()); + return lqw; + } + + /** + * 新增承包合同保函变更 + * + * @param bo 承包合同保函变更 + * @return 是否新增成功 + */ + @Override + public Boolean insertByBo(XzdGuaranteeChangeInfoBo bo) { + XzdGuaranteeChangeInfo add = MapstructUtils.convert(bo, XzdGuaranteeChangeInfo.class); + validEntityBeforeSave(add); + + Long l = baseMapper.selectCount(new LambdaQueryWrapper().gt(XzdGuaranteeChangeInfo::getCreateTime, LocalDate.now())); + String s = areaUtil.generateDateBasedNumber(); + + add.setDocumentNumber(s+"-"+(l+1)); + + boolean flag = baseMapper.insert(add) > 0; + if (flag) { + bo.setId(add.getId()); + } + return flag; + } + + /** + * 修改承包合同保函变更 + * + * @param bo 承包合同保函变更 + * @return 是否修改成功 + */ + @Override + public Boolean updateByBo(XzdGuaranteeChangeInfoBo bo) { + XzdGuaranteeChangeInfo update = MapstructUtils.convert(bo, XzdGuaranteeChangeInfo.class); + validEntityBeforeSave(update); + return baseMapper.updateById(update) > 0; + } + + /** + * 保存前的数据校验 + */ + private void validEntityBeforeSave(XzdGuaranteeChangeInfo entity){ + //TODO 做一些数据校验,如唯一约束 + } + + /** + * 校验并批量删除承包合同保函变更信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + @Override + public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { + if(isValid){ + for (Long id : ids) { + XzdGuaranteeChangeInfoVo xzdGuaranteeChangeInfoVo = baseMapper.selectVoById(id); + + // 删除附件 + if (!StringUtils.isEmpty(xzdGuaranteeChangeInfoVo.getFileId())){ + List collect = Arrays.stream(xzdGuaranteeChangeInfoVo.getFileId().split(",")).map(item -> { + return Long.parseLong(item); + }).collect(Collectors.toList()); + sysOssService.deleteWithValidByIds(collect, false); + } + } + } + return baseMapper.deleteByIds(ids) > 0; + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/contractBackletter/controller/XzdGuaranteeInfoController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/contractBackletter/controller/XzdGuaranteeInfoController.java new file mode 100644 index 00000000..a22b3f50 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/contractBackletter/controller/XzdGuaranteeInfoController.java @@ -0,0 +1,106 @@ +package org.dromara.xzd.deposit.contractBackletter.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.dromara.xzd.deposit.contractBackletter.domain.bo.XzdGuaranteeInfoBo; +import org.dromara.xzd.deposit.contractBackletter.domain.vo.XzdGuaranteeInfoVo; +import org.dromara.xzd.deposit.contractBackletter.service.IXzdGuaranteeInfoService; +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.common.mybatis.core.page.TableDataInfo; + +/** + * 承包合同保函 + * + * @author Lion Li + * @date 2025-10-12 + */ +@Validated +@RequiredArgsConstructor +@RestController +@RequestMapping("/deposit/guaranteeInfo") +public class XzdGuaranteeInfoController extends BaseController { + + private final IXzdGuaranteeInfoService xzdGuaranteeInfoService; + + /** + * 查询承包合同保函列表 + */ + @SaCheckPermission("deposit:guaranteeInfo:list") + @GetMapping("/list") + public TableDataInfo list(XzdGuaranteeInfoBo bo, PageQuery pageQuery) { + return xzdGuaranteeInfoService.queryPageList(bo, pageQuery); + } + + /** + * 导出承包合同保函列表 + */ + @SaCheckPermission("deposit:guaranteeInfo:export") + @Log(title = "承包合同保函", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(XzdGuaranteeInfoBo bo, HttpServletResponse response) { + List list = xzdGuaranteeInfoService.queryList(bo); + ExcelUtil.exportExcel(list, "承包合同保函", XzdGuaranteeInfoVo.class, response); + } + + /** + * 获取承包合同保函详细信息 + * + * @param id 主键 + */ + @SaCheckPermission("deposit:guaranteeInfo:query") + @GetMapping("/{id}") + public R getInfo(@NotNull(message = "主键不能为空") + @PathVariable Long id) { + return R.ok(xzdGuaranteeInfoService.queryById(id)); + } + + /** + * 新增承包合同保函 + */ + @SaCheckPermission("deposit:guaranteeInfo:add") + @Log(title = "承包合同保函", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping() + public R add(@Validated(AddGroup.class) @RequestBody XzdGuaranteeInfoBo bo) { + return toAjax(xzdGuaranteeInfoService.insertByBo(bo)); + } + + /** + * 修改承包合同保函 + */ + @SaCheckPermission("deposit:guaranteeInfo:edit") + @Log(title = "承包合同保函", businessType = BusinessType.UPDATE) + @RepeatSubmit() + @PutMapping() + public R edit(@Validated(EditGroup.class) @RequestBody XzdGuaranteeInfoBo bo) { + return toAjax(xzdGuaranteeInfoService.updateByBo(bo)); + } + + /** + * 删除承包合同保函 + * + * @param ids 主键串 + */ + @SaCheckPermission("deposit:guaranteeInfo:remove") + @Log(title = "承包合同保函", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public R remove(@NotEmpty(message = "主键不能为空") + @PathVariable Long[] ids) { + return toAjax(xzdGuaranteeInfoService.deleteWithValidByIds(List.of(ids), true)); + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/contractBackletter/domain/XzdGuaranteeInfo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/contractBackletter/domain/XzdGuaranteeInfo.java new file mode 100644 index 00000000..a689804e --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/contractBackletter/domain/XzdGuaranteeInfo.java @@ -0,0 +1,230 @@ +package org.dromara.xzd.deposit.contractBackletter.domain; + +import com.alibaba.excel.annotation.ExcelProperty; +import org.dromara.common.mybatis.core.domain.BaseEntity; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.time.LocalDateTime; +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.io.Serial; + +/** + * 承包合同保函对象 xzd_guarantee_info + * + * @author Lion Li + * @date 2025-10-12 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("xzd_guarantee_info") +public class XzdGuaranteeInfo extends BaseEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * + */ + @TableId(value = "id") + private Long id; + + /** + * 单据引用ID + */ + private Long danjuId; + + /** + * 合同类型(字典) + */ + private String contractType; + + /** + * 单据编号 + */ + private String documentNumber; + + /** + * 标题 + */ + private String title; + + /** + * 单据日期 + */ + private LocalDateTime documentDate; + + /** + * 合同编号 + */ + private String contractNumber; + + /** + * 合同名称 + */ + private String contractName; + + /** + * 合同金额 + */ + private Long contractAmount; + + /** + * 申请人 + */ + private String applicant; + + /** + * 工程项目 + */ + private String engineeringProject; + + /** + * 申请机构 + */ + private Long applicationOrganization; + /** + * 甲方单位 + */ + private Long partyAUnit; + + /** + * 乙方单位 + */ + private Long partyBUnit; + + /** + * 备注 + */ + private String remarks; + + /** + * 保函类型(字典) + */ + private String guaranteeType; + + /** + * 保函编号 + */ + private String guaranteeNumber; + + /** + * 保函金额 + */ + private Long guaranteeAmount; + + /** + * 币种(字典) + */ + private String currency; + + /** + * 保函百分比 + */ + private Long guaranteePercentage; + + /** + * 有无保函格式(0:无 1有) + */ + private Long hasGuaranteeFormat; + + /** + * 格式是否可改(0:无 1有) + */ + private Long isFormatChangeable; + + /** + * 开立银行 + */ + private String issuingBank; + + /** + * 开立方式 + */ + private String issuingMethod; + + /** + * 开立日期 + */ + private LocalDateTime issuingDate; + + /** + * 到期日期 + */ + private LocalDateTime dueDate; + + /** + * 是否减额保函(0:无 1有) + */ + private Long isReducedGuarantee; + + /** + * 质押金额 + */ + private Long pledgeAmount; + + /** + * 担保单位 + */ + private String guaranteeUnit; + + /** + * 反担保到期日期 + */ + private LocalDateTime counterGuaranteeDueDate; + + /** + * 受益人 + */ + private String beneficiary; + + /** + * 转开行信息 + */ + private String remittingBankInfo; + + /** + * 商业模式(字典) + */ + private String businessModel; + + /** + * 业主合同编号 + */ + private String ownerContractNumber; + + /** + * 保函状态(字典) + */ + private String guaranteeStatus; + + /** + * 延期日期 + */ + private LocalDateTime extensionDate; + + /** + * 闭卷日期 + */ + private LocalDateTime closedDate; + + /** + * 调整后保函金额 + */ + private Long adjustedGuaranteeAmount; + + /** + * 退还金额 + */ + private Long refundAmount; + + /** + * 附件ID(多个逗号分隔) + */ + private String fileId; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/contractBackletter/domain/bo/XzdGuaranteeInfoBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/contractBackletter/domain/bo/XzdGuaranteeInfoBo.java new file mode 100644 index 00000000..b56f0862 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/contractBackletter/domain/bo/XzdGuaranteeInfoBo.java @@ -0,0 +1,240 @@ +package org.dromara.xzd.deposit.contractBackletter.domain.bo; + +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.time.LocalDateTime; +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.dromara.xzd.deposit.contractBackletter.domain.XzdGuaranteeInfo; + +/** + * 承包合同保函业务对象 xzd_guarantee_info + * + * @author Lion Li + * @date 2025-10-12 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = XzdGuaranteeInfo.class, reverseConvertGenerate = false) +public class XzdGuaranteeInfoBo extends BaseEntity { + + /** + * + */ + @NotNull(message = "不能为空", groups = { EditGroup.class }) + private Long id; + + /** + * 单据引用ID + */ + private Long danjuId; + + /** + * 合同类型(字典) + */ + private String contractType; + + /** + * 单据编号 + */ + private String documentNumber; + + /** + * 标题 + */ + private String title; + + /** + * 单据日期 + */ + private LocalDateTime documentDate; + + /** + * 合同编号 + */ + private String contractNumber; + + /** + * 合同名称 + */ + private String contractName; + + /** + * 合同金额 + */ + private Long contractAmount; + + /** + * 申请人 + */ + private String applicant; + + /** + * 工程项目 + */ + private String engineeringProject; + + /** + * 申请机构 + */ + private Long applicationOrganization; + /** + * 甲方单位 + */ + private Long partyAUnit; + + /** + * 乙方单位 + */ + private Long partyBUnit; + + /** + * 备注 + */ + private String remarks; + + /** + * 保函类型(字典) + */ + private String guaranteeType; + + /** + * 保函编号 + */ + private String guaranteeNumber; + + /** + * 保函金额 + */ + private Long guaranteeAmount; + + /** + * 币种(字典) + */ + private String currency; + + /** + * 保函百分比 + */ + private Long guaranteePercentage; + + /** + * 有无保函格式(0:无 1有) + */ + private Long hasGuaranteeFormat; + + /** + * 格式是否可改(0:无 1有) + */ + private Long isFormatChangeable; + + /** + * 开立银行 + */ + private String issuingBank; + + /** + * 开立方式 + */ + private String issuingMethod; + + /** + * 开立日期 + */ + private LocalDateTime issuingDate; + + /** + * 到期日期 + */ + private LocalDateTime dueDate; + + /** + * 是否减额保函(0:无 1有) + */ + private Long isReducedGuarantee; + + /** + * 质押金额 + */ + private Long pledgeAmount; + + /** + * 担保单位 + */ + private String guaranteeUnit; + + /** + * 反担保到期日期 + */ + private LocalDateTime counterGuaranteeDueDate; + + /** + * 受益人 + */ + private String beneficiary; + + /** + * 转开行信息 + */ + private String remittingBankInfo; + + /** + * 商业模式(字典) + */ + private String businessModel; + + /** + * 业主合同编号 + */ + private String ownerContractNumber; + + /** + * 保函状态(字典) + */ + private String guaranteeStatus; + + /** + * 延期日期 + */ + private LocalDateTime extensionDate; + + /** + * 闭卷日期 + */ + private LocalDateTime closedDate; + + /** + * 调整后保函金额 + */ + private Long adjustedGuaranteeAmount; + + /** + * 退还金额 + */ + private Long refundAmount; + + /** + * 附件ID(多个逗号分隔) + */ + private String fileId; + + + + /** + * 开始日期 + */ + private LocalDateTime startDate; + + /** + * 结束日期 + * */ + private LocalDateTime endDate; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/contractBackletter/domain/vo/XzdGuaranteeInfoVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/contractBackletter/domain/vo/XzdGuaranteeInfoVo.java new file mode 100644 index 00000000..812f8c91 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/contractBackletter/domain/vo/XzdGuaranteeInfoVo.java @@ -0,0 +1,308 @@ +package org.dromara.xzd.deposit.contractBackletter.domain.vo; + +import java.time.LocalDateTime; +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +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 org.dromara.xzd.deposit.contractBackletter.domain.XzdGuaranteeInfo; + +import java.io.Serial; +import java.io.Serializable; +import java.util.Date; + + + +/** + * 承包合同保函视图对象 xzd_guarantee_info + * + * @author Lion Li + * @date 2025-10-12 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = XzdGuaranteeInfo.class) +public class XzdGuaranteeInfoVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * + */ + @ExcelProperty(value = "") + private Long id; + + /** + * 单据引用ID + */ + @ExcelProperty(value = "单据引用ID") + private Long danjuId; + + /** + * 合同类型(字典) + */ + @ExcelProperty(value = "合同类型", converter = ExcelDictConvert.class) + @ExcelDictFormat(dictType = "xzd_contract_type") + private String contractType; + + /** + * 单据编号 + */ + @ExcelProperty(value = "单据编号") + private String documentNumber; + + /** + * 标题 + */ + @ExcelProperty(value = "标题") + private String title; + + /** + * 单据日期 + */ + @ExcelProperty(value = "单据日期") + private LocalDateTime documentDate; + + /** + * 合同编号 + */ + @ExcelProperty(value = "合同编号") + private String contractNumber; + + /** + * 合同名称 + */ + @ExcelProperty(value = "合同名称") + private String contractName; + + /** + * 合同金额 + */ + @ExcelProperty(value = "合同金额") + private Long contractAmount; + + /** + * 申请人 + */ + @ExcelProperty(value = "申请人") + private String applicant; + + + /** + * 工程项目 + */ + @ExcelProperty(value = "工程项目") + private String engineeringProject; + + + + + /** + * 申请机构名称 + */ + @ExcelProperty(value = "申请机构名称") + private String applicationOrganizationName; + + /** + * 申请机构 + */ + @ExcelProperty(value = "申请机构") + private Long applicationOrganization; + + /** + * 甲方单位 + */ + @ExcelProperty(value = "甲方单位") + private Long partyAUnit; + + + /** + * 甲方单位名称 + */ + @ExcelProperty(value = "甲方单位名称") + private String partyAUnitName; + + /** + * 乙方单位 + */ + @ExcelProperty(value = "乙方单位") + private Long partyBUnit; + + /** + * 乙方单位名称 + */ + @ExcelProperty(value = "乙方单位名称") + private String partyBUnitName; + + /** + * 备注 + */ + @ExcelProperty(value = "备注") + private String remarks; + + /** + * 保函类型(字典) + */ + @ExcelProperty(value = "保函类型", converter = ExcelDictConvert.class) + @ExcelDictFormat(dictType = "xzd_backletter_type") + private String guaranteeType; + + /** + * 保函编号 + */ + @ExcelProperty(value = "保函编号") + private String guaranteeNumber; + + /** + * 保函金额 + */ + @ExcelProperty(value = "保函金额") + private Long guaranteeAmount; + + /** + * 币种(字典) + */ + @ExcelProperty(value = "币种", converter = ExcelDictConvert.class) + @ExcelDictFormat(dictType = "xzd_currency_type") + private String currency; + + /** + * 保函百分比 + */ + @ExcelProperty(value = "保函百分比") + private Long guaranteePercentage; + + /** + * 有无保函格式(0:无 1有) + */ + @ExcelProperty(value = "有无保函格式", converter = ExcelDictConvert.class) + @ExcelDictFormat(dictType = "xzd_not_backletter") + private Long hasGuaranteeFormat; + + /** + * 格式是否可改(0:无 1有) + */ + @ExcelProperty(value = "格式是否可改", converter = ExcelDictConvert.class) + @ExcelDictFormat(dictType = "xzd_not_format") + private Long isFormatChangeable; + + /** + * 开立银行 + */ + @ExcelProperty(value = "开立银行") + private String issuingBank; + + /** + * 开立方式 + */ + @ExcelProperty(value = "开立方式", converter = ExcelDictConvert.class) + @ExcelDictFormat(dictType = "xzd_kailifangshi") + private String issuingMethod; + + /** + * 开立日期 + */ + @ExcelProperty(value = "开立日期") + private LocalDateTime issuingDate; + + /** + * 到期日期 + */ + @ExcelProperty(value = "到期日期") + private LocalDateTime dueDate; + + /** + * 是否减额保函(0:无 1有) + */ + @ExcelProperty(value = "是否减额保函", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "0=:无,1=有") + private Long isReducedGuarantee; + + /** + * 质押金额 + */ + @ExcelProperty(value = "质押金额") + private Long pledgeAmount; + + /** + * 担保单位 + */ + @ExcelProperty(value = "担保单位") + private String guaranteeUnit; + + /** + * 反担保到期日期 + */ + @ExcelProperty(value = "反担保到期日期") + private LocalDateTime counterGuaranteeDueDate; + + /** + * 受益人 + */ + @ExcelProperty(value = "受益人") + private String beneficiary; + + /** + * 转开行信息 + */ + @ExcelProperty(value = "转开行信息") + private String remittingBankInfo; + + /** + * 商业模式(字典) + */ + @ExcelProperty(value = "商业模式", converter = ExcelDictConvert.class) + @ExcelDictFormat(dictType = "xzd_business") + private String businessModel; + + /** + * 业主合同编号 + */ + @ExcelProperty(value = "业主合同编号") + private String ownerContractNumber; + + /** + * 保函状态(字典) + */ + @ExcelProperty(value = "保函状态", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "字=典") + private String guaranteeStatus; + + /** + * 延期日期 + */ + @ExcelProperty(value = "延期日期") + private LocalDateTime extensionDate; + + /** + * 闭卷日期 + */ + @ExcelProperty(value = "闭卷日期") + private LocalDateTime closedDate; + + /** + * 调整后保函金额 + */ + @ExcelProperty(value = "调整后保函金额") + private Long adjustedGuaranteeAmount; + + /** + * 退还金额 + */ + @ExcelProperty(value = "退还金额") + private Long refundAmount; + + /** + * 附件ID(多个逗号分隔) + */ + @ExcelProperty(value = "附件ID", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "多=个逗号分隔") + private String fileId; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/contractBackletter/mapper/XzdGuaranteeInfoMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/contractBackletter/mapper/XzdGuaranteeInfoMapper.java new file mode 100644 index 00000000..0800c467 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/contractBackletter/mapper/XzdGuaranteeInfoMapper.java @@ -0,0 +1,17 @@ +package org.dromara.xzd.deposit.contractBackletter.mapper; + + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; +import org.dromara.xzd.deposit.contractBackletter.domain.XzdGuaranteeInfo; +import org.dromara.xzd.deposit.contractBackletter.domain.vo.XzdGuaranteeInfoVo; + +/** + * 承包合同保函Mapper接口 + * + * @author Lion Li + * @date 2025-10-12 + */ +public interface XzdGuaranteeInfoMapper extends BaseMapperPlus, BaseMapper { + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/contractBackletter/service/IXzdGuaranteeInfoService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/contractBackletter/service/IXzdGuaranteeInfoService.java new file mode 100644 index 00000000..7cf114f6 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/contractBackletter/service/IXzdGuaranteeInfoService.java @@ -0,0 +1,72 @@ +package org.dromara.xzd.deposit.contractBackletter.service; + + +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; + +import com.baomidou.mybatisplus.extension.service.IService; +import org.dromara.xzd.deposit.contractBackletter.domain.XzdGuaranteeInfo; +import org.dromara.xzd.deposit.contractBackletter.domain.bo.XzdGuaranteeInfoBo; +import org.dromara.xzd.deposit.contractBackletter.domain.vo.XzdGuaranteeInfoVo; + +import java.util.Collection; +import java.util.List; + +/** + * 承包合同保函Service接口 + * + * @author Lion Li + * @date 2025-10-12 + */ +public interface IXzdGuaranteeInfoService extends IService{ + + /** + * 查询承包合同保函 + * + * @param id 主键 + * @return 承包合同保函 + */ + XzdGuaranteeInfoVo queryById(Long id); + + /** + * 分页查询承包合同保函列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 承包合同保函分页列表 + */ + TableDataInfo queryPageList(XzdGuaranteeInfoBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的承包合同保函列表 + * + * @param bo 查询条件 + * @return 承包合同保函列表 + */ + List queryList(XzdGuaranteeInfoBo bo); + + /** + * 新增承包合同保函 + * + * @param bo 承包合同保函 + * @return 是否新增成功 + */ + Boolean insertByBo(XzdGuaranteeInfoBo bo); + + /** + * 修改承包合同保函 + * + * @param bo 承包合同保函 + * @return 是否修改成功 + */ + Boolean updateByBo(XzdGuaranteeInfoBo 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/deposit/contractBackletter/service/impl/XzdGuaranteeInfoServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/contractBackletter/service/impl/XzdGuaranteeInfoServiceImpl.java new file mode 100644 index 00000000..0e0af85b --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/contractBackletter/service/impl/XzdGuaranteeInfoServiceImpl.java @@ -0,0 +1,248 @@ +package org.dromara.xzd.deposit.contractBackletter.service.impl; + +import com.alibaba.excel.annotation.ExcelProperty; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.dromara.common.core.domain.R; +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.system.service.impl.SysOssServiceImpl; +import org.dromara.xzd.biddingManagement.biaoqianlixiang.domain.XzdBidPreProject; +import org.dromara.xzd.biddingManagement.biaoqianlixiang.domain.vo.XzdBidPreProjectVo; +import org.dromara.xzd.deposit.contractBackletter.domain.XzdGuaranteeInfo; +import org.dromara.xzd.deposit.contractBackletter.domain.bo.XzdGuaranteeInfoBo; +import org.dromara.xzd.deposit.contractBackletter.domain.vo.XzdGuaranteeInfoVo; +import org.dromara.xzd.deposit.contractBackletter.mapper.XzdGuaranteeInfoMapper; +import org.dromara.xzd.deposit.contractBackletter.service.IXzdGuaranteeInfoService; +import org.dromara.xzd.domain.dto.QuerCorrespondentDto; +import org.dromara.xzd.domain.vo.XzdSupplierInfoVo; +import org.dromara.xzd.service.IXzdCorrespondentList; +import org.dromara.xzd.service.impl.XzdSupplierInfoServiceImpl; +import org.dromara.xzd.utilS.AreaUtil; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + + +import java.time.LocalDate; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.Collection; +import java.util.stream.Collectors; + +/** + * 承包合同保函Service业务层处理 + * + * @author Lion Li + * @date 2025-10-12 + */ +@RequiredArgsConstructor +@Service +public class XzdGuaranteeInfoServiceImpl extends ServiceImpl implements IXzdGuaranteeInfoService { + + private final XzdGuaranteeInfoMapper baseMapper; + + + private final AreaUtil areaUtil; + + + @Autowired + private XzdSupplierInfoServiceImpl xzdSupplierInfoService; + + @Autowired + private IXzdCorrespondentList iXzdCorrespondentList; + + + private final SysOssServiceImpl sysOssService; + + /** + * 查询承包合同保函 + * + * @param id 主键 + * @return 承包合同保函 + */ + @Override + public XzdGuaranteeInfoVo queryById(Long id){ + XzdGuaranteeInfoVo xzdGuaranteeInfoVo = baseMapper.selectVoById(id); + List xzdGuaranteeInfoVo1 = List.of(xzdGuaranteeInfoVo); + // 装填数据 + setValue(xzdGuaranteeInfoVo1); + + + return xzdGuaranteeInfoVo1.getFirst(); + } + + private void setValue(List infos) { + for (XzdGuaranteeInfoVo info : infos) { + //申请机构(供应商信息列表) + XzdSupplierInfoVo xzdSupplierInfoVot = xzdSupplierInfoService.queryById(info.getApplicationOrganization()); + if (xzdSupplierInfoVot != null){ + info.setApplicationOrganizationName(xzdSupplierInfoVot.getUnitName()); + } + //乙方单位(供应商信息列表) + XzdSupplierInfoVo xzdSupplierInfoVo = xzdSupplierInfoService.queryById(info.getPartyBUnit()); + if (xzdSupplierInfoVo != null){ + info.setPartyBUnitName(xzdSupplierInfoVo.getUnitName()); + } + //甲方单位(客户信息列表) + R byid = iXzdCorrespondentList.getCustomerByid(info.getPartyAUnit()); + if (byid!=null){ + if (byid.getData().getXzdCustomerinformation() != null){ + info.setPartyAUnitName(byid.getData().getXzdCustomerinformation().getUnitName()); + } + } + + } + } + + /** + * 分页查询承包合同保函列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 承包合同保函分页列表 + */ + @Override + public TableDataInfo queryPageList(XzdGuaranteeInfoBo bo, PageQuery pageQuery) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); + + setValue(result.getRecords()); + return TableDataInfo.build(result); + } + + /** + * 查询符合条件的承包合同保函列表 + * + * @param bo 查询条件 + * @return 承包合同保函列表 + */ + @Override + public List queryList(XzdGuaranteeInfoBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private LambdaQueryWrapper buildQueryWrapper(XzdGuaranteeInfoBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.orderByDesc(XzdGuaranteeInfo::getId); + lqw.eq(bo.getDanjuId() != null, XzdGuaranteeInfo::getDanjuId, bo.getDanjuId()); + lqw.eq(StringUtils.isNotBlank(bo.getContractType()), XzdGuaranteeInfo::getContractType, bo.getContractType()); + lqw.eq(StringUtils.isNotBlank(bo.getDocumentNumber()), XzdGuaranteeInfo::getDocumentNumber, bo.getDocumentNumber()); + lqw.eq(StringUtils.isNotBlank(bo.getTitle()), XzdGuaranteeInfo::getTitle, bo.getTitle()); + lqw.eq(bo.getDocumentDate() != null, XzdGuaranteeInfo::getDocumentDate, bo.getDocumentDate()); + lqw.ge(bo.getStartDate() != null, XzdGuaranteeInfo::getDocumentDate,bo.getStartDate()); + lqw.le(bo.getEndDate() != null, XzdGuaranteeInfo::getDocumentDate,bo.getEndDate()); + + lqw.eq(StringUtils.isNotBlank(bo.getContractNumber()), XzdGuaranteeInfo::getContractNumber, bo.getContractNumber()); + lqw.like(StringUtils.isNotBlank(bo.getContractName()), XzdGuaranteeInfo::getContractName, bo.getContractName()); + lqw.eq(bo.getContractAmount() != null, XzdGuaranteeInfo::getContractAmount, bo.getContractAmount()); + lqw.eq(StringUtils.isNotBlank(bo.getApplicant()), XzdGuaranteeInfo::getApplicant, bo.getApplicant()); + lqw.eq(StringUtils.isNotBlank(bo.getEngineeringProject()), XzdGuaranteeInfo::getEngineeringProject, bo.getEngineeringProject()); + lqw.eq(bo.getApplicationOrganization() != null, XzdGuaranteeInfo::getApplicationOrganization, bo.getApplicationOrganization()); + lqw.eq(bo.getPartyAUnit() != null, XzdGuaranteeInfo::getPartyAUnit, bo.getPartyAUnit()); + lqw.eq(bo.getPartyBUnit() != null, XzdGuaranteeInfo::getPartyBUnit, bo.getPartyBUnit()); + lqw.eq(StringUtils.isNotBlank(bo.getRemarks()), XzdGuaranteeInfo::getRemarks, bo.getRemarks()); + lqw.eq(StringUtils.isNotBlank(bo.getGuaranteeType()), XzdGuaranteeInfo::getGuaranteeType, bo.getGuaranteeType()); + lqw.eq(StringUtils.isNotBlank(bo.getGuaranteeNumber()), XzdGuaranteeInfo::getGuaranteeNumber, bo.getGuaranteeNumber()); + lqw.eq(bo.getGuaranteeAmount() != null, XzdGuaranteeInfo::getGuaranteeAmount, bo.getGuaranteeAmount()); + lqw.eq(StringUtils.isNotBlank(bo.getCurrency()), XzdGuaranteeInfo::getCurrency, bo.getCurrency()); + lqw.eq(bo.getGuaranteePercentage() != null, XzdGuaranteeInfo::getGuaranteePercentage, bo.getGuaranteePercentage()); + lqw.eq(bo.getHasGuaranteeFormat() != null, XzdGuaranteeInfo::getHasGuaranteeFormat, bo.getHasGuaranteeFormat()); + lqw.eq(bo.getIsFormatChangeable() != null, XzdGuaranteeInfo::getIsFormatChangeable, bo.getIsFormatChangeable()); + lqw.eq(StringUtils.isNotBlank(bo.getIssuingBank()), XzdGuaranteeInfo::getIssuingBank, bo.getIssuingBank()); + lqw.eq(StringUtils.isNotBlank(bo.getIssuingMethod()), XzdGuaranteeInfo::getIssuingMethod, bo.getIssuingMethod()); + lqw.eq(bo.getIssuingDate() != null, XzdGuaranteeInfo::getIssuingDate, bo.getIssuingDate()); + lqw.eq(bo.getDueDate() != null, XzdGuaranteeInfo::getDueDate, bo.getDueDate()); + lqw.eq(bo.getIsReducedGuarantee() != null, XzdGuaranteeInfo::getIsReducedGuarantee, bo.getIsReducedGuarantee()); + lqw.eq(bo.getPledgeAmount() != null, XzdGuaranteeInfo::getPledgeAmount, bo.getPledgeAmount()); + lqw.eq(StringUtils.isNotBlank(bo.getGuaranteeUnit()), XzdGuaranteeInfo::getGuaranteeUnit, bo.getGuaranteeUnit()); + lqw.eq(bo.getCounterGuaranteeDueDate() != null, XzdGuaranteeInfo::getCounterGuaranteeDueDate, bo.getCounterGuaranteeDueDate()); + lqw.eq(StringUtils.isNotBlank(bo.getBeneficiary()), XzdGuaranteeInfo::getBeneficiary, bo.getBeneficiary()); + lqw.eq(StringUtils.isNotBlank(bo.getRemittingBankInfo()), XzdGuaranteeInfo::getRemittingBankInfo, bo.getRemittingBankInfo()); + lqw.eq(StringUtils.isNotBlank(bo.getBusinessModel()), XzdGuaranteeInfo::getBusinessModel, bo.getBusinessModel()); + lqw.eq(StringUtils.isNotBlank(bo.getOwnerContractNumber()), XzdGuaranteeInfo::getOwnerContractNumber, bo.getOwnerContractNumber()); + lqw.eq(StringUtils.isNotBlank(bo.getGuaranteeStatus()), XzdGuaranteeInfo::getGuaranteeStatus, bo.getGuaranteeStatus()); + lqw.eq(bo.getExtensionDate() != null, XzdGuaranteeInfo::getExtensionDate, bo.getExtensionDate()); + lqw.eq(bo.getClosedDate() != null, XzdGuaranteeInfo::getClosedDate, bo.getClosedDate()); + lqw.eq(bo.getAdjustedGuaranteeAmount() != null, XzdGuaranteeInfo::getAdjustedGuaranteeAmount, bo.getAdjustedGuaranteeAmount()); + lqw.eq(bo.getRefundAmount() != null, XzdGuaranteeInfo::getRefundAmount, bo.getRefundAmount()); + lqw.eq(StringUtils.isNotBlank(bo.getFileId()), XzdGuaranteeInfo::getFileId, bo.getFileId()); + return lqw; + } + + /** + * 新增承包合同保函 + * + * @param bo 承包合同保函 + * @return 是否新增成功 + */ + @Override + public Boolean insertByBo(XzdGuaranteeInfoBo bo) { + XzdGuaranteeInfo add = MapstructUtils.convert(bo, XzdGuaranteeInfo.class); + validEntityBeforeSave(add); + + Long l = baseMapper.selectCount(new LambdaQueryWrapper().gt(XzdGuaranteeInfo::getCreateTime, LocalDate.now())); + String s = areaUtil.generateDateBasedNumber(); + + add.setDocumentNumber(s+"-"+(l+1)); + + boolean flag = baseMapper.insert(add) > 0; + if (flag) { + bo.setId(add.getId()); + } + return flag; + } + + /** + * 修改承包合同保函 + * + * @param bo 承包合同保函 + * @return 是否修改成功 + */ + @Override + public Boolean updateByBo(XzdGuaranteeInfoBo bo) { + XzdGuaranteeInfo update = MapstructUtils.convert(bo, XzdGuaranteeInfo.class); + validEntityBeforeSave(update); + return baseMapper.updateById(update) > 0; + } + + /** + * 保存前的数据校验 + */ + private void validEntityBeforeSave(XzdGuaranteeInfo entity){ + //TODO 做一些数据校验,如唯一约束 + } + + /** + * 校验并批量删除承包合同保函信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + @Override + public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { + if(isValid){ + for (Long id : ids) { + XzdGuaranteeInfoVo xzdGuaranteeInfoVo = baseMapper.selectVoById(id); + + // 删除附件 + if (!StringUtils.isEmpty(xzdGuaranteeInfoVo.getFileId())){ + List collect = Arrays.stream(xzdGuaranteeInfoVo.getFileId().split(",")).map(item -> { + return Long.parseLong(item); + }).collect(Collectors.toList()); + sysOssService.deleteWithValidByIds(collect, false); + } + } + + } + return baseMapper.deleteByIds(ids) > 0; + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/earnestMoney/domain/bo/XzdDepositApplicationBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/earnestMoney/domain/bo/XzdDepositApplicationBo.java index f07f5185..21139f22 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/earnestMoney/domain/bo/XzdDepositApplicationBo.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/earnestMoney/domain/bo/XzdDepositApplicationBo.java @@ -26,13 +26,11 @@ public class XzdDepositApplicationBo extends BaseEntity { /** * */ - @NotNull(message = "不能为空", groups = { EditGroup.class }) private Long id; /** * 申请时间 */ - @NotNull(message = "申请时间不能为空", groups = { AddGroup.class, EditGroup.class }) private Date applicationTime; /** diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/earnestMoney/domain/vo/XzdDepositApplicationVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/earnestMoney/domain/vo/XzdDepositApplicationVo.java index 07ee3080..e806a591 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/earnestMoney/domain/vo/XzdDepositApplicationVo.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/earnestMoney/domain/vo/XzdDepositApplicationVo.java @@ -1,6 +1,9 @@ package org.dromara.xzd.deposit.earnestMoney.domain.vo; import java.util.Date; + +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.TableField; import com.fasterxml.jackson.annotation.JsonFormat; import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; import com.alibaba.excel.annotation.ExcelProperty; @@ -8,6 +11,8 @@ import org.dromara.common.excel.annotation.ExcelDictFormat; import org.dromara.common.excel.convert.ExcelDictConvert; import io.github.linpeilie.annotations.AutoMapper; import lombok.Data; +import org.dromara.common.translation.annotation.Translation; +import org.dromara.common.translation.constant.TransConstant; import org.dromara.xzd.deposit.earnestMoney.domain.XzdDepositApplication; import java.io.Serial; @@ -54,17 +59,36 @@ public class XzdDepositApplicationVo implements Serializable { @ExcelProperty(value = "申请人所属组织") private Long applicantOrganization; + /** + * 申请人所属组织名称 + */ + @Translation(type = TransConstant.DEPT_ID_TO_NAME, mapper = "applicantOrganization") + @ExcelProperty(value = "申请人所属组织名称") + private String applicantOrganizationName; + /** * 申请人所属部门 */ @ExcelProperty(value = "申请人所属部门") private Long applicantDepartment; + /** + * 申请人所属部门名称 + */ + @ExcelProperty(value = "申请人所属部门名称") + @Translation(type = TransConstant.DEPT_ID_TO_NAME, mapper = "applicantDepartment") + private String applicantDepartmentName; /** * 备案部门 */ @ExcelProperty(value = "备案部门") private Long recordDepartment; + /** + * 备案部门名称 + */ + @ExcelProperty(value = "备案部门名称") + @Translation(type = TransConstant.DEPT_ID_TO_NAME, mapper = "recordDepartment") + private Long recordDepartmentName; /** * 部门下属 @@ -151,5 +175,16 @@ public class XzdDepositApplicationVo implements Serializable { @ExcelProperty(value = "文件") private String fileId; + /** + * 创建者 + */ + @TableField(fill = FieldFill.INSERT) + private Long createBy; + + /** + * 创建者姓名 + */ + @Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "createBy") + private String createByName; } diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/refundDeposit/controller/XzdFbhtzbjthController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/refundDeposit/controller/XzdFbhtzbjthController.java new file mode 100644 index 00000000..7b8f06b0 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/refundDeposit/controller/XzdFbhtzbjthController.java @@ -0,0 +1,105 @@ +package org.dromara.xzd.deposit.refundDeposit.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.deposit.refundDeposit.domain.vo.XzdFbhtzbjthVo; +import org.dromara.xzd.deposit.refundDeposit.domain.bo.XzdFbhtzbjthBo; +import org.dromara.xzd.deposit.refundDeposit.service.IXzdFbhtzbjthService; +import org.dromara.common.mybatis.core.page.TableDataInfo; + +/** + * 分包合同质保金退还 + * + * @author Lion Li + * @date 2025-10-12 + */ +@Validated +@RequiredArgsConstructor +@RestController +@RequestMapping("/refundDeposit/fbhtzbjth") +public class XzdFbhtzbjthController extends BaseController { + + private final IXzdFbhtzbjthService xzdFbhtzbjthService; + + /** + * 查询分包合同质保金退还列表 + */ + @SaCheckPermission("refundDeposit:fbhtzbjth:list") + @GetMapping("/list") + public TableDataInfo list(XzdFbhtzbjthBo bo, PageQuery pageQuery) { + return xzdFbhtzbjthService.queryPageList(bo, pageQuery); + } + + /** + * 导出分包合同质保金退还列表 + */ + @SaCheckPermission("refundDeposit:fbhtzbjth:export") + @Log(title = "分包合同质保金退还", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(XzdFbhtzbjthBo bo, HttpServletResponse response) { + List list = xzdFbhtzbjthService.queryList(bo); + ExcelUtil.exportExcel(list, "分包合同质保金退还", XzdFbhtzbjthVo.class, response); + } + + /** + * 获取分包合同质保金退还详细信息 + * + * @param id 主键 + */ + @SaCheckPermission("refundDeposit:fbhtzbjth:query") + @GetMapping("/{id}") + public R getInfo(@NotNull(message = "主键不能为空") + @PathVariable Long id) { + return R.ok(xzdFbhtzbjthService.queryById(id)); + } + + /** + * 新增分包合同质保金退还 + */ + @SaCheckPermission("refundDeposit:fbhtzbjth:add") + @Log(title = "分包合同质保金退还", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping() + public R add(@Validated(AddGroup.class) @RequestBody XzdFbhtzbjthBo bo) { + return toAjax(xzdFbhtzbjthService.insertByBo(bo)); + } + + /** + * 修改分包合同质保金退还 + */ + @SaCheckPermission("refundDeposit:fbhtzbjth:edit") + @Log(title = "分包合同质保金退还", businessType = BusinessType.UPDATE) + @RepeatSubmit() + @PutMapping() + public R edit(@Validated(EditGroup.class) @RequestBody XzdFbhtzbjthBo bo) { + return toAjax(xzdFbhtzbjthService.updateByBo(bo)); + } + + /** + * 删除分包合同质保金退还 + * + * @param ids 主键串 + */ + @SaCheckPermission("refundDeposit:fbhtzbjth:remove") + @Log(title = "分包合同质保金退还", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public R remove(@NotEmpty(message = "主键不能为空") + @PathVariable Long[] ids) { + return toAjax(xzdFbhtzbjthService.deleteWithValidByIds(List.of(ids), true)); + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/refundDeposit/domain/XzdFbhtzbjth.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/refundDeposit/domain/XzdFbhtzbjth.java new file mode 100644 index 00000000..93c4590d --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/refundDeposit/domain/XzdFbhtzbjth.java @@ -0,0 +1,150 @@ +package org.dromara.xzd.deposit.refundDeposit.domain; + +import org.dromara.common.mybatis.core.domain.BaseEntity; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.time.LocalDateTime; +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.io.Serial; + +/** + * 分包合同质保金退还对象 xzd_fbhtzbjth + * + * @author Lion Li + * @date 2025-10-12 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("xzd_fbhtzbjth") +public class XzdFbhtzbjth extends BaseEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * + */ + @TableId(value = "id") + private Long id; + + /** + * 单据引用ID + */ + private Long danjuId; + + /** + * 单据编码 + */ + private String documentCode; + + /** + * 标题 + */ + private String title; + + /** + * 单据日期 + */ + private LocalDateTime documentDate; + + /** + * 合同编码 + */ + private String contractCode; + + /** + * 合同名称 + */ + private String contractName; + + /** + * 合同金额 + */ + private Long contractAmount; + + /** + * 决算单编码 + */ + private String finalAccountCode; + + /** + * 决算单名称 + */ + private String finalAccountName; + + /** + * 决算金额 + */ + private Long finalAccountAmount; + + /** + * 项目经理 + */ + private String projectManager; + + /** + * 项目 + */ + private String project; + + /** + * 质保金比例(%) + */ + private Long qualityDepositRatio; + + /** + * 申请单位 + */ + private String applicationUnit; + + /** + * 供应商负责人 + */ + private String supplierLeader; + + /** + * 质量保修金 + */ + private Long qualityWarranty; + + /** + * 保修开始日期 + */ + private LocalDateTime warrantyStartDate; + + /** + * 保修结束日期 + */ + private LocalDateTime warrantyEndDate; + + /** + * 扣除金额 + */ + private Long deductionAmount; + + /** + * 质保金退还金额 + */ + private Long qualityDepositRefund; + + /** + * 保修期内质量情况 + */ + private String qualityStatusDuringWarranty; + + /** + * 备注 + */ + private String remarks; + + /** + * 文件id (多个文件逗号分隔) + */ + private String fileId; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/refundDeposit/domain/bo/XzdFbhtzbjthBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/refundDeposit/domain/bo/XzdFbhtzbjthBo.java new file mode 100644 index 00000000..42f19574 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/refundDeposit/domain/bo/XzdFbhtzbjthBo.java @@ -0,0 +1,154 @@ +package org.dromara.xzd.deposit.refundDeposit.domain.bo; + +import org.dromara.xzd.deposit.refundDeposit.domain.XzdFbhtzbjth; +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.time.LocalDate; +import java.time.LocalDateTime; +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; + +/** + * 分包合同质保金退还业务对象 xzd_fbhtzbjth + * + * @author Lion Li + * @date 2025-10-12 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = XzdFbhtzbjth.class, reverseConvertGenerate = false) +public class XzdFbhtzbjthBo extends BaseEntity { + + /** + * + */ + private Long id; + + /** + * 单据引用ID + */ + private Long danjuId; + + /** + * 单据编码 + */ + private String documentCode; + + /** + * 标题 + */ + private String title; + + /** + * 单据日期 + */ + private LocalDateTime documentDate; + + /** + * 合同编码 + */ + private String contractCode; + + /** + * 合同名称 + */ + private String contractName; + + /** + * 合同金额 + */ + private Long contractAmount; + + /** + * 决算单编码 + */ + private String finalAccountCode; + + /** + * 决算单名称 + */ + private String finalAccountName; + + /** + * 决算金额 + */ + private Long finalAccountAmount; + + /** + * 项目经理 + */ + private String projectManager; + + /** + * 项目 + */ + private String project; + + /** + * 质保金比例(%) + */ + private Long qualityDepositRatio; + + /** + * 申请单位 + */ + private String applicationUnit; + + /** + * 供应商负责人 + */ + private String supplierLeader; + + /** + * 质量保修金 + */ + private Long qualityWarranty; + + /** + * 保修开始日期 + */ + private LocalDateTime warrantyStartDate; + + /** + * 保修结束日期 + */ + private LocalDateTime warrantyEndDate; + + /** + * 扣除金额 + */ + private Long deductionAmount; + + /** + * 质保金退还金额 + */ + private Long qualityDepositRefund; + + /** + * 保修期内质量情况 + */ + private String qualityStatusDuringWarranty; + + /** + * 备注 + */ + private String remarks; + + /** + * 文件id (多个文件逗号分隔) + */ + private String fileId; + + + private LocalDate startTime; + + private LocalDate endTime; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/refundDeposit/domain/vo/XzdFbhtzbjthVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/refundDeposit/domain/vo/XzdFbhtzbjthVo.java new file mode 100644 index 00000000..215b17e8 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/refundDeposit/domain/vo/XzdFbhtzbjthVo.java @@ -0,0 +1,198 @@ +package org.dromara.xzd.deposit.refundDeposit.domain.vo; + +import java.time.LocalDateTime; +import java.util.Date; + +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.TableField; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.dromara.common.translation.annotation.Translation; +import org.dromara.common.translation.constant.TransConstant; +import org.dromara.xzd.deposit.refundDeposit.domain.XzdFbhtzbjth; +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.util.Date; + + + +/** + * 分包合同质保金退还视图对象 xzd_fbhtzbjth + * + * @author Lion Li + * @date 2025-10-12 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = XzdFbhtzbjth.class) +public class XzdFbhtzbjthVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * + */ + @ExcelProperty(value = "") + private Long id; + + /** + * 单据引用ID + */ + @ExcelProperty(value = "单据引用ID") + private Long danjuId; + + /** + * 单据编码 + */ + @ExcelProperty(value = "单据编码") + private String documentCode; + + /** + * 标题 + */ + @ExcelProperty(value = "标题") + private String title; + + /** + * 单据日期 + */ + @ExcelProperty(value = "单据日期") + private LocalDateTime documentDate; + + /** + * 合同编码 + */ + @ExcelProperty(value = "合同编码") + private String contractCode; + + /** + * 合同名称 + */ + @ExcelProperty(value = "合同名称") + private String contractName; + + /** + * 合同金额 + */ + @ExcelProperty(value = "合同金额") + private Long contractAmount; + + /** + * 决算单编码 + */ + @ExcelProperty(value = "决算单编码") + private String finalAccountCode; + + /** + * 决算单名称 + */ + @ExcelProperty(value = "决算单名称") + private String finalAccountName; + + /** + * 决算金额 + */ + @ExcelProperty(value = "决算金额") + private Long finalAccountAmount; + + /** + * 项目经理 + */ + @ExcelProperty(value = "项目经理") + private String projectManager; + + /** + * 项目 + */ + @ExcelProperty(value = "项目") + private String project; + + /** + * 质保金比例(%) + */ + @ExcelProperty(value = "质保金比例(%)") + private Long qualityDepositRatio; + + /** + * 申请单位 + */ + @ExcelProperty(value = "申请单位") + private String applicationUnit; + + /** + * 供应商负责人 + */ + @ExcelProperty(value = "供应商负责人") + private String supplierLeader; + + /** + * 质量保修金 + */ + @ExcelProperty(value = "质量保修金") + private Long qualityWarranty; + + /** + * 保修开始日期 + */ + @ExcelProperty(value = "保修开始日期") + private LocalDateTime warrantyStartDate; + + /** + * 保修结束日期 + */ + @ExcelProperty(value = "保修结束日期") + private LocalDateTime warrantyEndDate; + + /** + * 扣除金额 + */ + @ExcelProperty(value = "扣除金额") + private Long deductionAmount; + + /** + * 质保金退还金额 + */ + @ExcelProperty(value = "质保金退还金额") + private Long qualityDepositRefund; + + /** + * 保修期内质量情况 + */ + @ExcelProperty(value = "保修期内质量情况") + private String qualityStatusDuringWarranty; + + /** + * 备注 + */ + @ExcelProperty(value = "备注") + private String remarks; + + /** + * 文件id (多个文件逗号分隔) + */ + @ExcelProperty(value = "文件id ", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "多=个文件逗号分隔") + private String fileId; + + + /** + * 创建者 + */ + @TableField(fill = FieldFill.INSERT) + private Long createBy; + + /** + * 创建者姓名 + */ + @Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "createBy") + private String createByName; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/refundDeposit/mapper/XzdFbhtzbjthMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/refundDeposit/mapper/XzdFbhtzbjthMapper.java new file mode 100644 index 00000000..03e78617 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/refundDeposit/mapper/XzdFbhtzbjthMapper.java @@ -0,0 +1,15 @@ +package org.dromara.xzd.deposit.refundDeposit.mapper; + +import org.dromara.xzd.deposit.refundDeposit.domain.XzdFbhtzbjth; +import org.dromara.xzd.deposit.refundDeposit.domain.vo.XzdFbhtzbjthVo; +import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; + +/** + * 分包合同质保金退还Mapper接口 + * + * @author Lion Li + * @date 2025-10-12 + */ +public interface XzdFbhtzbjthMapper extends BaseMapperPlus { + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/refundDeposit/service/IXzdFbhtzbjthService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/refundDeposit/service/IXzdFbhtzbjthService.java new file mode 100644 index 00000000..7c2799b6 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/refundDeposit/service/IXzdFbhtzbjthService.java @@ -0,0 +1,70 @@ +package org.dromara.xzd.deposit.refundDeposit.service; + +import org.dromara.xzd.deposit.refundDeposit.domain.vo.XzdFbhtzbjthVo; +import org.dromara.xzd.deposit.refundDeposit.domain.bo.XzdFbhtzbjthBo; +import org.dromara.xzd.deposit.refundDeposit.domain.XzdFbhtzbjth; +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-10-12 + */ +public interface IXzdFbhtzbjthService extends IService{ + + /** + * 查询分包合同质保金退还 + * + * @param id 主键 + * @return 分包合同质保金退还 + */ + XzdFbhtzbjthVo queryById(Long id); + + /** + * 分页查询分包合同质保金退还列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 分包合同质保金退还分页列表 + */ + TableDataInfo queryPageList(XzdFbhtzbjthBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的分包合同质保金退还列表 + * + * @param bo 查询条件 + * @return 分包合同质保金退还列表 + */ + List queryList(XzdFbhtzbjthBo bo); + + /** + * 新增分包合同质保金退还 + * + * @param bo 分包合同质保金退还 + * @return 是否新增成功 + */ + Boolean insertByBo(XzdFbhtzbjthBo bo); + + /** + * 修改分包合同质保金退还 + * + * @param bo 分包合同质保金退还 + * @return 是否修改成功 + */ + Boolean updateByBo(XzdFbhtzbjthBo 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/deposit/refundDeposit/service/impl/XzdFbhtzbjthServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/refundDeposit/service/impl/XzdFbhtzbjthServiceImpl.java new file mode 100644 index 00000000..a4e77a39 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/deposit/refundDeposit/service/impl/XzdFbhtzbjthServiceImpl.java @@ -0,0 +1,189 @@ +package org.dromara.xzd.deposit.refundDeposit.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +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.system.service.impl.SysOssServiceImpl; +import org.dromara.xzd.biddingManagement.biaoqianlixiang.domain.XzdBidPreProject; +import org.dromara.xzd.biddingManagement.biaoqianlixiang.domain.vo.XzdBidPreProjectVo; +import org.dromara.xzd.utilS.AreaUtil; +import org.springframework.stereotype.Service; +import org.dromara.xzd.deposit.refundDeposit.domain.bo.XzdFbhtzbjthBo; +import org.dromara.xzd.deposit.refundDeposit.domain.vo.XzdFbhtzbjthVo; +import org.dromara.xzd.deposit.refundDeposit.domain.XzdFbhtzbjth; +import org.dromara.xzd.deposit.refundDeposit.mapper.XzdFbhtzbjthMapper; +import org.dromara.xzd.deposit.refundDeposit.service.IXzdFbhtzbjthService; + +import java.time.LocalDate; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.Collection; +import java.util.stream.Collectors; + +/** + * 分包合同质保金退还Service业务层处理 + * + * @author Lion Li + * @date 2025-10-12 + */ +@RequiredArgsConstructor +@Service +public class XzdFbhtzbjthServiceImpl extends ServiceImpl implements IXzdFbhtzbjthService { + + private final XzdFbhtzbjthMapper baseMapper; + + private final AreaUtil areaUtil; + + private final SysOssServiceImpl sysOssService; + + /** + * 查询分包合同质保金退还 + * + * @param id 主键 + * @return 分包合同质保金退还 + */ + @Override + public XzdFbhtzbjthVo queryById(Long id){ + return baseMapper.selectVoById(id); + } + + /** + * 分页查询分包合同质保金退还列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 分包合同质保金退还分页列表 + */ + @Override + public TableDataInfo queryPageList(XzdFbhtzbjthBo 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(XzdFbhtzbjthBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private LambdaQueryWrapper buildQueryWrapper(XzdFbhtzbjthBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.orderByDesc(XzdFbhtzbjth::getId); + lqw.eq(bo.getDanjuId() != null, XzdFbhtzbjth::getDanjuId, bo.getDanjuId()); + lqw.eq(StringUtils.isNotBlank(bo.getDocumentCode()), XzdFbhtzbjth::getDocumentCode, bo.getDocumentCode()); + lqw.eq(StringUtils.isNotBlank(bo.getTitle()), XzdFbhtzbjth::getTitle, bo.getTitle()); + lqw.eq(bo.getDocumentDate() != null, XzdFbhtzbjth::getDocumentDate, bo.getDocumentDate()); + lqw.ge(bo.getStartTime() != null, XzdFbhtzbjth::getDocumentDate, bo.getStartTime()); + lqw.le(bo.getEndTime() != null, XzdFbhtzbjth::getDocumentDate, bo.getEndTime()); + lqw.eq(bo.getCreateDept() != null, XzdFbhtzbjth::getCreateDept, bo.getCreateDept()); + + + lqw.eq(StringUtils.isNotBlank(bo.getContractCode()), XzdFbhtzbjth::getContractCode, bo.getContractCode()); + lqw.like(StringUtils.isNotBlank(bo.getContractName()), XzdFbhtzbjth::getContractName, bo.getContractName()); + lqw.eq(bo.getContractAmount() != null, XzdFbhtzbjth::getContractAmount, bo.getContractAmount()); + lqw.eq(StringUtils.isNotBlank(bo.getFinalAccountCode()), XzdFbhtzbjth::getFinalAccountCode, bo.getFinalAccountCode()); + lqw.like(StringUtils.isNotBlank(bo.getFinalAccountName()), XzdFbhtzbjth::getFinalAccountName, bo.getFinalAccountName()); + lqw.eq(bo.getFinalAccountAmount() != null, XzdFbhtzbjth::getFinalAccountAmount, bo.getFinalAccountAmount()); + lqw.eq(StringUtils.isNotBlank(bo.getProjectManager()), XzdFbhtzbjth::getProjectManager, bo.getProjectManager()); + lqw.eq(StringUtils.isNotBlank(bo.getProject()), XzdFbhtzbjth::getProject, bo.getProject()); + lqw.eq(bo.getQualityDepositRatio() != null, XzdFbhtzbjth::getQualityDepositRatio, bo.getQualityDepositRatio()); + lqw.eq(StringUtils.isNotBlank(bo.getApplicationUnit()), XzdFbhtzbjth::getApplicationUnit, bo.getApplicationUnit()); + lqw.eq(StringUtils.isNotBlank(bo.getSupplierLeader()), XzdFbhtzbjth::getSupplierLeader, bo.getSupplierLeader()); + lqw.eq(bo.getQualityWarranty() != null, XzdFbhtzbjth::getQualityWarranty, bo.getQualityWarranty()); + lqw.eq(bo.getWarrantyStartDate() != null, XzdFbhtzbjth::getWarrantyStartDate, bo.getWarrantyStartDate()); + lqw.eq(bo.getWarrantyEndDate() != null, XzdFbhtzbjth::getWarrantyEndDate, bo.getWarrantyEndDate()); + lqw.eq(bo.getDeductionAmount() != null, XzdFbhtzbjth::getDeductionAmount, bo.getDeductionAmount()); + lqw.eq(bo.getQualityDepositRefund() != null, XzdFbhtzbjth::getQualityDepositRefund, bo.getQualityDepositRefund()); + lqw.eq(StringUtils.isNotBlank(bo.getQualityStatusDuringWarranty()), XzdFbhtzbjth::getQualityStatusDuringWarranty, bo.getQualityStatusDuringWarranty()); + lqw.eq(StringUtils.isNotBlank(bo.getRemarks()), XzdFbhtzbjth::getRemarks, bo.getRemarks()); + lqw.eq(StringUtils.isNotBlank(bo.getFileId()), XzdFbhtzbjth::getFileId, bo.getFileId()); + return lqw; + } + + /** + * 新增分包合同质保金退还 + * + * @param bo 分包合同质保金退还 + * @return 是否新增成功 + */ + @Override + public Boolean insertByBo(XzdFbhtzbjthBo bo) { + XzdFbhtzbjth add = MapstructUtils.convert(bo, XzdFbhtzbjth.class); + validEntityBeforeSave(add); + + + Long l = baseMapper.selectCount(new LambdaQueryWrapper().gt(XzdFbhtzbjth::getCreateTime, LocalDate.now())); + String s = areaUtil.generateDateBasedNumber(); + + add.setDocumentCode(s+"-"+(l+1)); + + boolean flag = baseMapper.insert(add) > 0; + if (flag) { + bo.setId(add.getId()); + } + return flag; + } + + /** + * 修改分包合同质保金退还 + * + * @param bo 分包合同质保金退还 + * @return 是否修改成功 + */ + @Override + public Boolean updateByBo(XzdFbhtzbjthBo bo) { + XzdFbhtzbjth update = MapstructUtils.convert(bo, XzdFbhtzbjth.class); + validEntityBeforeSave(update); + return baseMapper.updateById(update) > 0; + } + + /** + * 保存前的数据校验 + */ + private void validEntityBeforeSave(XzdFbhtzbjth entity){ + //TODO 做一些数据校验,如唯一约束 + if (entity.getQualityDepositRatio() == null && entity.getQualityDepositRatio() < 0 && entity.getQualityDepositRatio() > 100) { + throw new RuntimeException("质保金比例不能为空且在0-100之间"); + + } + } + + /** + * 校验并批量删除分包合同质保金退还信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + @Override + public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { + if(isValid){ + for (Long id : ids) { + XzdFbhtzbjthVo xzdFbhtzbjthVo = baseMapper.selectVoById(id); + // 删除附件 + if (!StringUtils.isEmpty(xzdFbhtzbjthVo.getFileId())){ + List collect = Arrays.stream(xzdFbhtzbjthVo.getFileId().split(",")).map(item -> { + return Long.parseLong(item); + }).collect(Collectors.toList()); + sysOssService.deleteWithValidByIds(collect, false); + } + } + } + return baseMapper.deleteByIds(ids) > 0; + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/XzdContractAdvanceInfo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/XzdContractAdvanceInfo.java index 4d254869..72ee8461 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/XzdContractAdvanceInfo.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/XzdContractAdvanceInfo.java @@ -87,6 +87,17 @@ public class XzdContractAdvanceInfo extends BaseEntity { * 备注 */ private String remarks; + /** + * 付款性质 + */ + private String paymentNature; + + /** + * 支付计算基数 + */ + private String paymentCalculationBase; + + } diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/XzdContractDepositInfo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/XzdContractDepositInfo.java index e3fdc48c..95121d52 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/XzdContractDepositInfo.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/XzdContractDepositInfo.java @@ -33,7 +33,6 @@ public class XzdContractDepositInfo extends BaseEntity { * 承包合同信息ID */ private Long contractDetailsId; - /** * 履约保证金形式(字典) */ diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/bo/XzdContractAdvanceInfoBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/bo/XzdContractAdvanceInfoBo.java index edcf13e0..a0773de9 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/bo/XzdContractAdvanceInfoBo.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/bo/XzdContractAdvanceInfoBo.java @@ -89,5 +89,17 @@ public class XzdContractAdvanceInfoBo extends BaseEntity { */ private String remarks; + /** + * 付款性质 + */ + private String paymentNature; + + /** + * 支付计算基数 + */ + private String paymentCalculationBase; + + + } diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/vo/XzdContractAdvanceInfoVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/vo/XzdContractAdvanceInfoVo.java index d5c9c910..90184a20 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/vo/XzdContractAdvanceInfoVo.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/vo/XzdContractAdvanceInfoVo.java @@ -104,4 +104,17 @@ public class XzdContractAdvanceInfoVo implements Serializable { private String remarks; + /** + * 付款性质 + */ + private String paymentNature; + + /** + * 支付计算基数 + */ + private String paymentCalculationBase; + + + + } 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 22904ec7..854e02f1 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 @@ -7,7 +7,10 @@ public enum XzdClassEnum { XZD_CONTRACT_CHANGE("xzd_contract_change"), - CS_CONTRACT_INFORMATION("xzd_cs_contract_information"); + CS_CONTRACT_INFORMATION("xzd_cs_contract_information"), + PURCHASE_CONTRACT_INFORMATION("xzd_purchase_contract_information"); + + 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 69ed3201..e8be9b6c 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 @@ -4,7 +4,8 @@ package org.dromara.xzd.enums; public enum ZxdEnum { TYPE_CORRESPONDENT("客户","1"), - TYPE_SUPPLIER("供应商","2"); + TYPE_SUPPLIER("供应商","2"), + PURCHASE_PREFIX("采购合同信息前缀","CCTEG(CWZ)"); private final String TypeName; diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/utilS/AreaUtil.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/utilS/AreaUtil.java index 6d37afaf..e9af28bf 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/utilS/AreaUtil.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/utilS/AreaUtil.java @@ -66,9 +66,15 @@ public class AreaUtil { } - // 生成日期格式的数字 + // 生成日期格式的数字 年月日 public static String generateDateBasedNumber() { String dateStr = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyMMdd")); return String.format(dateStr); } + + // 生成日期格式的数字 年 + public static String generateDateBasedNumberByY() { + String dateStr = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy")); + return String.format(dateStr); + } }