platformx-business-finance-api/src/main/java/com/by4cloud/platformx/business/entity/Contract.java
@@ -111,7 +111,6 @@ */ @Transient @TableField(exist = false) @Schema(description = "审批人姓名(临时字段)") private String approverName; /** platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/controller/ContractController.java
@@ -1,24 +1,119 @@ package com.by4cloud.platformx.business.controller; import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.collection.CollUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.by4cloud.platformx.business.entity.Contract; import com.by4cloud.platformx.common.core.util.R; import com.by4cloud.platformx.common.log.annotation.SysLog; import com.by4cloud.platformx.business.service.ContractService; import org.springframework.security.access.prepost.PreAuthorize; import com.by4cloud.platformx.common.excel.annotation.ResponseExcel; import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; import org.springdoc.core.annotations.ParameterObject; import org.springframework.http.HttpHeaders; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.Operation; import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.*; import java.util.List; import java.util.Objects; /** * @author cd * @description * @date 2026/4/29 14:05 **/ * 合同管理 * * @author platformx * @date 2026-04-29 16:46:26 */ @RestController @RequiredArgsConstructor @RequestMapping("/contract" ) @Tag(description = "contract" , name = "合同表管理" ) @Tag(description = "contract" , name = "合同管理管理" ) @SecurityRequirement(name = HttpHeaders.AUTHORIZATION) public class ContractController { private final ContractService contractService; } private final ContractService contractService; /** * 分页查询 * @param page 分页对象 * @param contract 合同管理 * @return */ @Operation(summary = "分页查询" , description = "分页查询" ) @GetMapping("/page" ) @PreAuthorize("@pms.hasPermission('business_contract_view')" ) public R getContractPage(@ParameterObject Page page, @ParameterObject Contract contract) { LambdaQueryWrapper<Contract> wrapper = Wrappers.lambdaQuery(); return R.ok(contractService.page(page, wrapper)); } /** * 通过id查询合同管理 * @param id id * @return R */ @Operation(summary = "通过id查询" , description = "通过id查询" ) @GetMapping("/{id}" ) @PreAuthorize("@pms.hasPermission('business_contract_view')" ) public R getById(@PathVariable("id" ) Long id) { return R.ok(contractService.getById(id)); } /** * 新增合同管理 * @param contract 合同管理 * @return R */ @Operation(summary = "新增合同管理" , description = "新增合同管理" ) @SysLog("新增合同管理" ) @PostMapping @PreAuthorize("@pms.hasPermission('business_contract_add')" ) public R save(@RequestBody Contract contract) { return R.ok(contractService.save(contract)); } /** * 修改合同管理 * @param contract 合同管理 * @return R */ @Operation(summary = "修改合同管理" , description = "修改合同管理" ) @SysLog("修改合同管理" ) @PutMapping @PreAuthorize("@pms.hasPermission('business_contract_edit')" ) public R updateById(@RequestBody Contract contract) { return R.ok(contractService.updateById(contract)); } /** * 通过id删除合同管理 * @param ids id列表 * @return R */ @Operation(summary = "通过id删除合同管理" , description = "通过id删除合同管理" ) @SysLog("通过id删除合同管理" ) @DeleteMapping @PreAuthorize("@pms.hasPermission('business_contract_del')" ) public R removeById(@RequestBody Long[] ids) { return R.ok(contractService.removeBatchByIds(CollUtil.toList(ids))); } /** * 导出excel 表格 * @param contract 查询条件 * @param ids 导出指定ID * @return excel 文件流 */ @ResponseExcel @GetMapping("/export") @PreAuthorize("@pms.hasPermission('business_contract_export')" ) public List<Contract> export(Contract contract,Long[] ids) { return contractService.list(Wrappers.lambdaQuery(contract).in(ArrayUtil.isNotEmpty(ids), Contract::getId, ids)); } } platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/controller/ContractPaymentScheduleController.java
New file @@ -0,0 +1,119 @@ package com.by4cloud.platformx.business.controller; import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.collection.CollUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.by4cloud.platformx.business.entity.ContractPaymentSchedule; import com.by4cloud.platformx.common.core.util.R; import com.by4cloud.platformx.common.log.annotation.SysLog; import com.by4cloud.platformx.business.service.ContractPaymentScheduleService; import org.springframework.security.access.prepost.PreAuthorize; import com.by4cloud.platformx.common.excel.annotation.ResponseExcel; import io.swagger.v3.oas.annotations.security.SecurityRequirement; import org.springdoc.core.annotations.ParameterObject; import org.springframework.http.HttpHeaders; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.Operation; import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.*; import java.util.List; import java.util.Objects; /** * 合同收款计划/履约节点表 * * @author platformx * @date 2026-04-29 16:37:26 */ @RestController @RequiredArgsConstructor @RequestMapping("/contractPaymentSchedule" ) @Tag(description = "contractPaymentSchedule" , name = "合同收款计划/履约节点表管理" ) @SecurityRequirement(name = HttpHeaders.AUTHORIZATION) public class ContractPaymentScheduleController { private final ContractPaymentScheduleService contractPaymentScheduleService; /** * 分页查询 * @param page 分页对象 * @param contractPaymentSchedule 合同收款计划/履约节点表 * @return */ @Operation(summary = "分页查询" , description = "分页查询" ) @GetMapping("/page" ) @PreAuthorize("@pms.hasPermission('business_contractPaymentSchedule_view')" ) public R getContractPaymentSchedulePage(@ParameterObject Page page, @ParameterObject ContractPaymentSchedule contractPaymentSchedule) { LambdaQueryWrapper<ContractPaymentSchedule> wrapper = Wrappers.lambdaQuery(); return R.ok(contractPaymentScheduleService.page(page, wrapper)); } /** * 通过id查询合同收款计划/履约节点表 * @param id id * @return R */ @Operation(summary = "通过id查询" , description = "通过id查询" ) @GetMapping("/{id}" ) @PreAuthorize("@pms.hasPermission('business_contractPaymentSchedule_view')" ) public R getById(@PathVariable("id" ) Long id) { return R.ok(contractPaymentScheduleService.getById(id)); } /** * 新增合同收款计划/履约节点表 * @param contractPaymentSchedule 合同收款计划/履约节点表 * @return R */ @Operation(summary = "新增合同收款计划/履约节点表" , description = "新增合同收款计划/履约节点表" ) @SysLog("新增合同收款计划/履约节点表" ) @PostMapping @PreAuthorize("@pms.hasPermission('business_contractPaymentSchedule_add')" ) public R save(@RequestBody ContractPaymentSchedule contractPaymentSchedule) { return R.ok(contractPaymentScheduleService.save(contractPaymentSchedule)); } /** * 修改合同收款计划/履约节点表 * @param contractPaymentSchedule 合同收款计划/履约节点表 * @return R */ @Operation(summary = "修改合同收款计划/履约节点表" , description = "修改合同收款计划/履约节点表" ) @SysLog("修改合同收款计划/履约节点表" ) @PutMapping @PreAuthorize("@pms.hasPermission('business_contractPaymentSchedule_edit')" ) public R updateById(@RequestBody ContractPaymentSchedule contractPaymentSchedule) { return R.ok(contractPaymentScheduleService.updateById(contractPaymentSchedule)); } /** * 通过id删除合同收款计划/履约节点表 * @param ids id列表 * @return R */ @Operation(summary = "通过id删除合同收款计划/履约节点表" , description = "通过id删除合同收款计划/履约节点表" ) @SysLog("通过id删除合同收款计划/履约节点表" ) @DeleteMapping @PreAuthorize("@pms.hasPermission('business_contractPaymentSchedule_del')" ) public R removeById(@RequestBody Long[] ids) { return R.ok(contractPaymentScheduleService.removeBatchByIds(CollUtil.toList(ids))); } /** * 导出excel 表格 * @param contractPaymentSchedule 查询条件 * @param ids 导出指定ID * @return excel 文件流 */ @ResponseExcel @GetMapping("/export") @PreAuthorize("@pms.hasPermission('business_contractPaymentSchedule_export')" ) public List<ContractPaymentSchedule> export(ContractPaymentSchedule contractPaymentSchedule,Long[] ids) { return contractPaymentScheduleService.list(Wrappers.lambdaQuery(contractPaymentSchedule).in(ArrayUtil.isNotEmpty(ids), ContractPaymentSchedule::getId, ids)); } } platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/controller/ContractSubjectMatterController.java
New file @@ -0,0 +1,119 @@ package com.by4cloud.platformx.business.controller; import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.collection.CollUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.by4cloud.platformx.business.entity.ContractSubjectMatter; import com.by4cloud.platformx.common.core.util.R; import com.by4cloud.platformx.common.log.annotation.SysLog; import com.by4cloud.platformx.business.service.ContractSubjectMatterService; import org.springframework.security.access.prepost.PreAuthorize; import com.by4cloud.platformx.common.excel.annotation.ResponseExcel; import io.swagger.v3.oas.annotations.security.SecurityRequirement; import org.springdoc.core.annotations.ParameterObject; import org.springframework.http.HttpHeaders; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.Operation; import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.*; import java.util.List; import java.util.Objects; /** * 合同标的物明细表 * * @author platformx * @date 2026-04-29 16:39:29 */ @RestController @RequiredArgsConstructor @RequestMapping("/contractSubjectMatter" ) @Tag(description = "contractSubjectMatter" , name = "合同标的物明细表管理" ) @SecurityRequirement(name = HttpHeaders.AUTHORIZATION) public class ContractSubjectMatterController { private final ContractSubjectMatterService contractSubjectMatterService; /** * 分页查询 * @param page 分页对象 * @param contractSubjectMatter 合同标的物明细表 * @return */ @Operation(summary = "分页查询" , description = "分页查询" ) @GetMapping("/page" ) @PreAuthorize("@pms.hasPermission('business_contractSubjectMatter_view')" ) public R getContractSubjectMatterPage(@ParameterObject Page page, @ParameterObject ContractSubjectMatter contractSubjectMatter) { LambdaQueryWrapper<ContractSubjectMatter> wrapper = Wrappers.lambdaQuery(); return R.ok(contractSubjectMatterService.page(page, wrapper)); } /** * 通过id查询合同标的物明细表 * @param id id * @return R */ @Operation(summary = "通过id查询" , description = "通过id查询" ) @GetMapping("/{id}" ) @PreAuthorize("@pms.hasPermission('business_contractSubjectMatter_view')" ) public R getById(@PathVariable("id" ) Long id) { return R.ok(contractSubjectMatterService.getById(id)); } /** * 新增合同标的物明细表 * @param contractSubjectMatter 合同标的物明细表 * @return R */ @Operation(summary = "新增合同标的物明细表" , description = "新增合同标的物明细表" ) @SysLog("新增合同标的物明细表" ) @PostMapping @PreAuthorize("@pms.hasPermission('business_contractSubjectMatter_add')" ) public R save(@RequestBody ContractSubjectMatter contractSubjectMatter) { return R.ok(contractSubjectMatterService.save(contractSubjectMatter)); } /** * 修改合同标的物明细表 * @param contractSubjectMatter 合同标的物明细表 * @return R */ @Operation(summary = "修改合同标的物明细表" , description = "修改合同标的物明细表" ) @SysLog("修改合同标的物明细表" ) @PutMapping @PreAuthorize("@pms.hasPermission('business_contractSubjectMatter_edit')" ) public R updateById(@RequestBody ContractSubjectMatter contractSubjectMatter) { return R.ok(contractSubjectMatterService.updateById(contractSubjectMatter)); } /** * 通过id删除合同标的物明细表 * @param ids id列表 * @return R */ @Operation(summary = "通过id删除合同标的物明细表" , description = "通过id删除合同标的物明细表" ) @SysLog("通过id删除合同标的物明细表" ) @DeleteMapping @PreAuthorize("@pms.hasPermission('business_contractSubjectMatter_del')" ) public R removeById(@RequestBody Long[] ids) { return R.ok(contractSubjectMatterService.removeBatchByIds(CollUtil.toList(ids))); } /** * 导出excel 表格 * @param contractSubjectMatter 查询条件 * @param ids 导出指定ID * @return excel 文件流 */ @ResponseExcel @GetMapping("/export") @PreAuthorize("@pms.hasPermission('business_contractSubjectMatter_export')" ) public List<ContractSubjectMatter> export(ContractSubjectMatter contractSubjectMatter,Long[] ids) { return contractSubjectMatterService.list(Wrappers.lambdaQuery(contractSubjectMatter).in(ArrayUtil.isNotEmpty(ids), ContractSubjectMatter::getId, ids)); } } platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/mapper/ContractPaymentScheduleMapper.java
New file @@ -0,0 +1,11 @@ package com.by4cloud.platformx.business.mapper; import com.by4cloud.platformx.business.entity.ContractPaymentSchedule; import com.by4cloud.platformx.common.data.datascope.PlatformxBaseMapper; import org.apache.ibatis.annotations.Mapper; @Mapper public interface ContractPaymentScheduleMapper extends PlatformxBaseMapper<ContractPaymentSchedule> { } platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/mapper/ContractSubjectMatterMapper.java
New file @@ -0,0 +1,11 @@ package com.by4cloud.platformx.business.mapper; import com.by4cloud.platformx.business.entity.ContractSubjectMatter; import com.by4cloud.platformx.common.data.datascope.PlatformxBaseMapper; import org.apache.ibatis.annotations.Mapper; @Mapper public interface ContractSubjectMatterMapper extends PlatformxBaseMapper<ContractSubjectMatter> { } platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/ContractPaymentScheduleService.java
New file @@ -0,0 +1,8 @@ package com.by4cloud.platformx.business.service; import com.baomidou.mybatisplus.extension.service.IService; import com.by4cloud.platformx.business.entity.ContractPaymentSchedule; public interface ContractPaymentScheduleService extends IService<ContractPaymentSchedule> { } platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/ContractSubjectMatterService.java
New file @@ -0,0 +1,8 @@ package com.by4cloud.platformx.business.service; import com.baomidou.mybatisplus.extension.service.IService; import com.by4cloud.platformx.business.entity.ContractSubjectMatter; public interface ContractSubjectMatterService extends IService<ContractSubjectMatter> { } platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/ContractPaymentScheduleServiceImpl.java
New file @@ -0,0 +1,16 @@ package com.by4cloud.platformx.business.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.by4cloud.platformx.business.entity.ContractPaymentSchedule; import com.by4cloud.platformx.business.mapper.ContractPaymentScheduleMapper; import com.by4cloud.platformx.business.service.ContractPaymentScheduleService; import org.springframework.stereotype.Service; /** * 合同收款计划/履约节点表 * * @author platformx * @date 2026-04-29 16:37:26 */ @Service public class ContractPaymentScheduleServiceImpl extends ServiceImpl<ContractPaymentScheduleMapper, ContractPaymentSchedule> implements ContractPaymentScheduleService { } platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/ContractSubjectMatterServiceImpl.java
New file @@ -0,0 +1,16 @@ package com.by4cloud.platformx.business.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.by4cloud.platformx.business.entity.ContractSubjectMatter; import com.by4cloud.platformx.business.mapper.ContractSubjectMatterMapper; import com.by4cloud.platformx.business.service.ContractSubjectMatterService; import org.springframework.stereotype.Service; /** * 合同标的物明细表 * * @author platformx * @date 2026-04-29 16:39:29 */ @Service public class ContractSubjectMatterServiceImpl extends ServiceImpl<ContractSubjectMatterMapper, ContractSubjectMatter> implements ContractSubjectMatterService { } platformx-business-finance-biz/src/main/resources/mapper/ContractPaymentScheduleMapper.xml
New file @@ -0,0 +1,31 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.by4cloud.platformx.business.mapper.ContractPaymentScheduleMapper"> <resultMap id="contractPaymentScheduleMap" type="com.by4cloud.platformx.business.entity.ContractPaymentSchedule"> <id property="id" column="id"/> <result property="compId" column="comp_id"/> <result property="actualAmount" column="actual_amount"/> <result property="agreedDays" column="agreed_days"/> <result property="calculationBasis" column="calculation_basis"/> <result property="contractId" column="contract_id"/> <result property="contractName" column="contract_name"/> <result property="effectiveDate" column="effective_date"/> <result property="fulfillmentStatus" column="fulfillment_status"/> <result property="paymentRatio" column="payment_ratio"/> <result property="paymentStatus" column="payment_status"/> <result property="plannedAmount" column="planned_amount"/> <result property="plannedPaymentDate" column="planned_payment_date"/> <result property="remark" column="remark"/> <result property="stageName" column="stage_name"/> <result property="stageOrder" column="stage_order"/> <result property="subjectMatterId" column="subject_matter_id"/> <result property="subjectMatterName" column="subject_matter_name"/> <result property="createBy" column="create_by"/> <result property="createTime" column="create_time"/> <result property="updateBy" column="update_by"/> <result property="updateTime" column="update_time"/> <result property="delFlag" column="del_flag"/> </resultMap> </mapper> platformx-business-finance-biz/src/main/resources/mapper/ContractSubjectMatterMapper.xml
New file @@ -0,0 +1,40 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.by4cloud.platformx.business.mapper.ContractSubjectMatterMapper"> <resultMap id="contractSubjectMatterMap" type="com.by4cloud.platformx.business.entity.ContractSubjectMatter"> <id property="id" column="id"/> <result property="compId" column="comp_id"/> <result property="acceptTime" column="accept_time"/> <result property="actualDeliveryDate" column="actual_delivery_date"/> <result property="attachmentUrl" column="attachment_url"/> <result property="brand" column="brand"/> <result property="category" column="category"/> <result property="contractId" column="contract_id"/> <result property="contractName" column="contract_name"/> <result property="deliveryPlace" column="delivery_place"/> <result property="deliveryStatus" column="delivery_status"/> <result property="description" column="description"/> <result property="isAccepted" column="is_accepted"/> <result property="materialCode" column="material_code"/> <result property="materialInternalName" column="material_internal_name"/> <result property="materialName" column="material_name"/> <result property="plannedDeliveryDate" column="planned_delivery_date"/> <result property="quantity" column="quantity"/> <result property="sortOrder" column="sort_order"/> <result property="specification" column="specification"/> <result property="taxAmount" column="tax_amount"/> <result property="taxRate" column="tax_rate"/> <result property="totalAmount" column="total_amount"/> <result property="totalAmountExcludingTax" column="total_amount_excluding_tax"/> <result property="unit" column="unit"/> <result property="unitPrice" column="unit_price"/> <result property="warrantyPeriod" column="warranty_period"/> <result property="createBy" column="create_by"/> <result property="createTime" column="create_time"/> <result property="updateBy" column="update_by"/> <result property="updateTime" column="update_time"/> <result property="delFlag" column="del_flag"/> </resultMap> </mapper>