feat(contract): 完善合同模版管理功能

- 移除示例模块依赖配置,优化项目结构
- 调整Admin模块控制器依赖顺序,修正模块引用错误
- 更新开发环境数据库配置,调整连接信息及资源路径
- 新增合同模版及打印模版实体、Mapper接口和Service接口
- 实现合同模版管理服务,包括列表查询、详情、创建、编辑、删除功能
- 新增合同模版控制器,提供REST接口支持前端访问
- 实现合同模版表单验证,包含唯一性和必填字段校验
- 支持合同打印模版子表数据的增删改操作
- 增加分页、排序及复杂条件查询支持,兼容PC与APP端数据过滤
- 完善合同模版数据转换和返回,支持多端数据交换和展示
This commit is contained in:
2026-05-21 16:21:22 +08:00
parent f81ecf9316
commit 06f5fec8d2
29 changed files with 1197 additions and 290 deletions

View File

@@ -0,0 +1,56 @@
package com.yunzhupaas.cm.entity;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import java.util.Date;
import java.util.List;
import com.alibaba.fastjson.annotation.JSONField;
/**
* 合同打印模版
*
* @版本: V5.2.7
* @版权: Copyright @ 2025 深圳市乐程软件有限公司版权所有
* @作者: 深圳市乐程软件有限公司
* @日期: 2026-05-21
*/
@Data
@TableName("cm_contract_printing_temp")
public class ContractPrintingTempEntity {
@TableId(value ="contract_printing_temp_id" )
@JSONField(name = "contract_printing_temp_id")
private String contractPrintingTempId;
@TableField("contract_temp_id")
@JSONField(name = "contract_temp_id")
private String contractTempId;
@TableField(value = "printing_temp_id" , updateStrategy = FieldStrategy.IGNORED)
@JSONField(name = "printing_temp_id")
private String printingTempId;
@TableField(value = "is_enabled" , updateStrategy = FieldStrategy.IGNORED)
@JSONField(name = "is_enabled")
private String isEnabled;
@TableField("remark")
@JSONField(name = "remark")
private String remark;
@TableField("create_by")
@JSONField(name = "create_by")
private String createBy;
@TableField("create_time")
@JSONField(name = "create_time")
private Date createTime;
@TableField("update_by")
@JSONField(name = "update_by")
private String updateBy;
@TableField("update_time")
@JSONField(name = "update_time")
private Date updateTime;
@TableField(value = "f_tenant_id",fill = FieldFill.INSERT_UPDATE)
@JSONField(name = "f_tenant_id")
private String tenantId;
@TableField("f_flow_id")
@JSONField(name = "f_flow_id")
private String flowId;
@TableField("f_flow_task_id")
@JSONField(name = "f_flow_task_id")
private String flowTaskId;
}

View File

@@ -0,0 +1,92 @@
package com.yunzhupaas.cm.entity;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import java.util.Date;
import java.util.List;
import com.alibaba.fastjson.annotation.JSONField;
/**
* 合同模版
*
* @版本: V5.2.7
* @版权: Copyright @ 2025 深圳市乐程软件有限公司版权所有
* @作者: 深圳市乐程软件有限公司
* @日期: 2026-05-21
*/
@Data
@TableName("cm_contract_temp")
public class ContractTempEntity {
@TableId(value ="contract_temp_id" )
@JSONField(name = "contract_temp_id")
private String contractTempId;
@TableField(value = "contract_temp_code" , updateStrategy = FieldStrategy.IGNORED)
@JSONField(name = "contract_temp_code")
private String contractTempCode;
@TableField(value = "contract_temp_name" , updateStrategy = FieldStrategy.IGNORED)
@JSONField(name = "contract_temp_name")
private String contractTempName;
@TableField(value = "is_framework" , updateStrategy = FieldStrategy.IGNORED)
@JSONField(name = "is_framework")
private String isFramework;
@TableField(value = "is_detail_list" , updateStrategy = FieldStrategy.IGNORED)
@JSONField(name = "is_detail_list")
private String isDetailList;
@TableField(value = "enable_tableProductList" , updateStrategy = FieldStrategy.IGNORED)
@JSONField(name = "enable_tableProductList")
private String enableTableProductList;
@TableField(value = "enable_tableMaterialList" , updateStrategy = FieldStrategy.IGNORED)
@JSONField(name = "enable_tableMaterialList")
private String enableTableMaterialList;
@TableField(value = "enable_tableWorktypeList" , updateStrategy = FieldStrategy.IGNORED)
@JSONField(name = "enable_tableWorktypeList")
private String enableTableWorktypeList;
@TableField(value = "enable_tableAssetList" , updateStrategy = FieldStrategy.IGNORED)
@JSONField(name = "enable_tableAssetList")
private String enableTableAssetList;
@TableField(value = "enable_tableTaskList" , updateStrategy = FieldStrategy.IGNORED)
@JSONField(name = "enable_tableTaskList")
private String enableTableTaskList;
@TableField(value = "contract_type" , updateStrategy = FieldStrategy.IGNORED)
@JSONField(name = "contract_type")
private String contractType;
@TableField(value = "enable_printing" , updateStrategy = FieldStrategy.IGNORED)
@JSONField(name = "enable_printing")
private String enablePrinting;
@TableField(value = "our_company_type" , updateStrategy = FieldStrategy.IGNORED)
@JSONField(name = "our_company_type")
private String ourCompanyType;
@TableField(value = "second_party_type" , updateStrategy = FieldStrategy.IGNORED)
@JSONField(name = "second_party_type")
private String secondPartyType;
@TableField(value = "third_party_type" , updateStrategy = FieldStrategy.IGNORED)
@JSONField(name = "third_party_type")
private String thirdPartyType;
@TableField(value = "remark" , updateStrategy = FieldStrategy.IGNORED)
@JSONField(name = "remark")
private String remark;
@TableField("create_by")
@JSONField(name = "create_by")
private String createBy;
@TableField("create_time")
@JSONField(name = "create_time")
private Date createTime;
@TableField("update_by")
@JSONField(name = "update_by")
private String updateBy;
@TableField("update_time")
@JSONField(name = "update_time")
private Date updateTime;
@TableField(value = "f_tenant_id",fill = FieldFill.INSERT_UPDATE)
@JSONField(name = "f_tenant_id")
private String tenantId;
@TableField("f_flow_id")
@JSONField(name = "f_flow_id")
private String flowId;
@TableField("f_flow_task_id")
@JSONField(name = "f_flow_task_id")
private String flowTaskId;
@JSONField(name = "contractPrintingTemp")
@TableField(exist = false)
private List<ContractPrintingTempEntity> contractPrintingTemp;
}

View File

@@ -0,0 +1,25 @@
package com.yunzhupaas.cm.model.contracttemp;
import lombok.Data;
import java.sql.Time;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.alibaba.fastjson.annotation.JSONField;
import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
import java.math.BigDecimal;
import java.util.List;
/**
*
* 合同模版管理
* @版本: V5.2.7
* @版权: Copyright @ 2025 深圳市乐程软件有限公司版权所有
* @作者: 深圳市乐程软件有限公司
* @日期: 2026-05-21
*/
@Data
public class ContractPrintingTempExcelVO{
}

View File

@@ -0,0 +1,38 @@
package com.yunzhupaas.cm.model.contracttemp;
import lombok.Data;
import java.util.List;
import java.util.Date;
import java.math.BigDecimal;
import com.alibaba.fastjson.annotation.JSONField;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
/**
*
* 合同模版管理
* 版本: V5.2.7
* 版权: Copyright @ 2025 深圳市乐程软件有限公司版权所有
* 作者: 深圳市乐程软件有限公司
* 日期: 2026-05-21
*/
@Data
@Schema(description = "ContractPrintingTemp子表参数")
public class ContractPrintingTempModel {
/** 子表ContractPrintingTemp 主键contract_printing_temp_id **/
@Schema(description = "主键")
@JsonProperty("contract_printing_temp_id")
private String contract_printing_temp_id;
/** 打印模版ID **/
@Schema(description = "打印模版ID")
@JsonProperty("printing_temp_id")
@JSONField(name = "printing_temp_id")
private Object printingTempId;
/** 是否启用 **/
@Schema(description = "是否启用")
@JsonProperty("is_enabled")
@JSONField(name = "is_enabled")
private String isEnabled;
}

View File

@@ -0,0 +1,22 @@
package com.yunzhupaas.cm.model.contracttemp;
import lombok.Data;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.alibaba.fastjson.annotation.JSONField;
/**
*
* 合同模版管理
* @版本: V5.2.7
* @版权: Copyright @ 2025 深圳市乐程软件有限公司版权所有
* @作者: 深圳市乐程软件有限公司
* @日期: 2026-05-21
*/
@Data
public class ContractTempExcelErrorVO extends ContractTempExcelVO{
@Excel(name = "异常原因",orderNum = "-999")
@JSONField(name = "errorsInfo")
private String errorsInfo;
}

View File

@@ -0,0 +1,25 @@
package com.yunzhupaas.cm.model.contracttemp;
import lombok.Data;
import java.sql.Time;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.alibaba.fastjson.annotation.JSONField;
import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
import java.math.BigDecimal;
import java.util.List;
/**
*
* 合同模版管理
* @版本: V5.2.7
* @版权: Copyright @ 2025 深圳市乐程软件有限公司版权所有
* @作者: 深圳市乐程软件有限公司
* @日期: 2026-05-21
*/
@Data
public class ContractTempExcelVO{
}

View File

@@ -0,0 +1,106 @@
package com.yunzhupaas.cm.model.contracttemp;
import lombok.Data;
import java.util.*;
import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.v3.oas.annotations.media.Schema;
/**
* 合同模版管理
* @版本: V5.2.7
* @版权: Copyright @ 2025 深圳市乐程软件有限公司版权所有
* @作者: 深圳市乐程软件有限公司
* @日期: 2026-05-21
*/
@Data
@Schema(description = "表单参数")
public class ContractTempForm {
/** 主键 */
@Schema(description = "主键")
@JSONField(name = "contract_temp_id")
private String contractTempId;
/** 合同模版编码 **/
@Schema(description = "合同模版编码")
@JsonProperty("contract_temp_code")
@JSONField(name = "contract_temp_code")
private String contractTempCode;
/** 合同模版名称 **/
@Schema(description = "合同模版名称")
@JsonProperty("contract_temp_name")
@JSONField(name = "contract_temp_name")
private String contractTempName;
/** 备注 **/
@Schema(description = "备注")
@JsonProperty("remark")
@JSONField(name = "remark")
private String remark;
/** 框架合同 **/
@Schema(description = "框架合同")
@JsonProperty("is_framework")
@JSONField(name = "is_framework")
private Integer isFramework;
/** 清单合同 **/
@Schema(description = "清单合同")
@JsonProperty("is_detail_list")
@JSONField(name = "is_detail_list")
private Integer isDetailList;
/** 启用产品清单 **/
@Schema(description = "启用产品清单")
@JsonProperty("enable_tableProductList")
@JSONField(name = "enable_tableProductList")
private Integer enableTableProductList;
/** 启用材料清单 **/
@Schema(description = "启用材料清单")
@JsonProperty("enable_tableMaterialList")
@JSONField(name = "enable_tableMaterialList")
private Integer enableTableMaterialList;
/** 启用人力清单 **/
@Schema(description = "启用人力清单")
@JsonProperty("enable_tableWorktypeList")
@JSONField(name = "enable_tableWorktypeList")
private Integer enableTableWorktypeList;
/** 启用资产清单 **/
@Schema(description = "启用资产清单")
@JsonProperty("enable_tableAssetList")
@JSONField(name = "enable_tableAssetList")
private Integer enableTableAssetList;
/** 启用任务清单 **/
@Schema(description = "启用任务清单")
@JsonProperty("enable_tableTaskList")
@JSONField(name = "enable_tableTaskList")
private Integer enableTableTaskList;
/** 合同类型 **/
@Schema(description = "合同类型")
@JsonProperty("contract_type")
@JSONField(name = "contract_type")
private Object contractType;
/** 启用在线打印 **/
@Schema(description = "启用在线打印")
@JsonProperty("enable_printing")
@JSONField(name = "enable_printing")
private Integer enablePrinting;
/** 我方签约类型 **/
@Schema(description = "我方签约类型")
@JsonProperty("our_company_type")
@JSONField(name = "our_company_type")
private Object ourCompanyType;
/** 乙方签约类型 **/
@Schema(description = "乙方签约类型")
@JsonProperty("second_party_type")
@JSONField(name = "second_party_type")
private Object secondPartyType;
/** 丙方签约类型 **/
@Schema(description = "丙方签约类型")
@JsonProperty("third_party_type")
@JSONField(name = "third_party_type")
private Object thirdPartyType;
/** 子表数据 **/
@Schema(description = "contractPrintingTemp子表数据")
@JsonProperty("contractPrintingTempList")
private List<ContractPrintingTempModel> contractPrintingTempList;
}

View File

@@ -0,0 +1,45 @@
package com.yunzhupaas.cm.model.contracttemp;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import com.yunzhupaas.base.Pagination;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.List;
/**
*
* 合同模版管理
* @版本: V5.2.7
* @版权: Copyright @ 2025 深圳市乐程软件有限公司版权所有
* @作者: 深圳市乐程软件有限公司
* @日期: 2026-05-21
*/
@Data
@Schema(description = "列表查询参数")
public class ContractTempPagination extends Pagination {
/** 关键词搜索 */
@Schema(description = "关键词搜索")
private String yunzhupaasKeyword;
/** 查询key */
@Schema(description = "查询key")
private String[] selectKey;
/** 选中数据数组id */
@Schema(description = "选中数据数组id")
private Object[] selectIds;
/** json */
@Schema(description = "json")
private String json;
/** 数据类型 0-当前页1-全部数据 */
@Schema(description = "数据类型 0-当前页1-全部数据")
private String dataType;
/** 高级查询 */
@Schema(description = "高级查询")
private String superQueryJson;
/** 功能id */
@Schema(description = "功能id")
private String moduleId;
/** 菜单id */
@Schema(description = "菜单id")
private String menuId;
}