统一修改包

This commit is contained in:
chenbowen
2025-09-22 03:44:58 +08:00
parent f014ca7cf3
commit 58e2827a21
289 changed files with 1485 additions and 1485 deletions

View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>dsc-base</artifactId>
<groupId>com.zt.plat</groupId>
<version>${revision}</version>
</parent>
<modules>
<module>zt-module-contract-order-api</module>
<module>zt-module-contract-order-server</module>
</modules>
<modelVersion>4.0.0</modelVersion>
<artifactId>cloud-module-contract-order</artifactId>
<packaging>pom</packaging>
<name>${project.artifactId}</name>
<description>
ContractOrder 模块。
</description>
</project>

View File

@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>cloud-module-contract-order</artifactId>
<groupId>com.zt.plat</groupId>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>cloud-module-contract-order-api</artifactId>
<packaging>jar</packaging>
<name>${project.artifactId}</name>
<description>
暴露给其它模块调用
</description>
<dependencies>
<dependency>
<groupId>com.zt.plat</groupId>
<artifactId>cloud-common</artifactId>
</dependency>
<!-- Web 相关 -->
<dependency>
<groupId>org.springdoc</groupId> <!-- 接口文档:使用最新版本的 Swagger 模型 -->
<artifactId>springdoc-openapi-starter-webmvc-api</artifactId>
<scope>provided</scope>
</dependency>
<!-- 参数校验 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
<optional>true</optional>
</dependency>
<!-- RPC 远程调用相关 -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
<optional>true</optional>
</dependency>
</dependencies>
</project>

View File

@@ -0,0 +1,18 @@
package com.zt.plat.module.contractorder.enums;
import com.zt.plat.framework.common.exception.ErrorCode;
/**
* contract-order 错误码枚举类
*
* contract-order 系统,使用 1-xxx-xxx-xxx 段
*
* @author ZT
*/
public interface ErrorCodeConstants {
// ========== 合同模块 1-027-000-000 ==========
ErrorCode CONTRACT_NUM_TRANSFINITE = new ErrorCode(1_027_000_000, "系统合同编号超限最大合同编号999999");
ErrorCode CONTRACT_NAME_EXISTS = new ErrorCode(1_027_000_001, "合同名已存在");
ErrorCode CONTRACT_PAPER_NUMBER_EXISTS = new ErrorCode(1_027_000_002, "合同编号已存在");
}

View File

@@ -0,0 +1,14 @@
package com.zt.plat.module.contractorder.enums.contract;
/**
* 合同字典类型常量
*
* @author ZT
*/
public class ContractDictTypeConstants {
// 合同状态
public static String BSE_CTRT_STS = "BSE_CTRT_STS";
// 合同类型(字典名:业务类型)
public static String BSN_TP = "BSN_TP";
}

View File

@@ -0,0 +1,67 @@
package com.zt.plat.module.contractorder.enums.contract;
/**
* 合同状态枚举
*/
public enum ContractStatusEnum {
/**
* 合同状态-草稿
*/
DRAFT("草稿","DRAFT","可以删除"),
/**
* 合同状态-正在审核
*/
UNDER_REVIEW("正在审核","UNDER_REVIEW","不允许任何操作"),
/**
* 合同状态-执行中
*/
IN_PROGRESS("执行中","IN_PROGRESS","可以终止、归档"),
/**
* 合同状态-已驳回
*/
REJECTED("已驳回","REJECTED","可以删除"),
/**
* 合同状态-已终止
*/
TERMINATED("已终止","TERMINATED","只允许归档"),
/**
* 合同状态-已归档
*/
ARCHIVED("已归档","ARCHIVED","不允许任何操作"),
/**
* 合同状态-已删除
*/
DELETED("已删除","DELETED","不允许任何操作");
ContractStatusEnum(String label, String code, String remark) {
this.label = label;
this.code = code;
this.remark = remark;
}
/**
* 字典标签
*/
private final String label;
/**
* 字典编码
*/
private final String code;
/**
* 备注
*/
private final String remark;
public String getLabel() {
return label;
}
public String getCode() {
return code;
}
public String getRemark() {
return remark;
}
}

View File

@@ -0,0 +1,55 @@
package com.zt.plat.module.contractorder.enums.contract;
/**
* 合同类型枚举
*/
public enum ContractTypeEnum {
/**
* 采购
*/
PRCH("采购","PRCH",null),
/**
* 销售
*/
SALE("销售","SALE",null),
/**
* 委托加工
*/
ENTT("委托加工","ENTT",null),
/**
* 来料加工
*/
MKE("来料加工","MKE",null);
ContractTypeEnum(String label, String code, String remark) {
this.label = label;
this.code = code;
this.remark = remark;
}
/**
* 字典标签
*/
private final String label;
/**
* 字典编码
*/
private final String code;
/**
* 备注
*/
private final String remark;
public String getLabel() {
return label;
}
public String getCode() {
return code;
}
public String getRemark() {
return remark;
}
}

View File

@@ -0,0 +1,7 @@
package com.zt.plat.module.contractorder.enums.contract;
public class DateConstants {
// 日期格式
public static final String DATE_FORMAT_YEAR_MONTH_DAY_8_BIT = "yyyyMMdd";
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,18 @@
package com.zt.plat.module.contractorder;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
/**
* ContractOrder 模块的启动类
*
* @author ZT
*/
//@SpringBootApplication
public class ContractOrderServerApplication {
public static void main(String[] args) {
SpringApplication.run(ContractOrderServerApplication.class, args);
}
}

View File

@@ -0,0 +1,48 @@
package com.zt.plat.module.contractorder.controller.admin.contract;
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
import com.zt.plat.framework.common.pojo.CommonResult;
import com.zt.plat.framework.common.pojo.PageResult;
import com.zt.plat.framework.common.util.object.BeanUtils;
import com.zt.plat.module.contractorder.controller.admin.contract.vo.preparaton.ContractPageReqVO;
import com.zt.plat.module.contractorder.controller.admin.contract.vo.preparaton.ContractRespVO;
import com.zt.plat.module.contractorder.controller.admin.contract.vo.preparaton.ContractSaveReqVO;
import com.zt.plat.module.contractorder.dal.dataobject.contract.ContractMainDO;
import com.zt.plat.module.contractorder.service.contract.ContractService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import jakarta.validation.Valid;
import lombok.extern.slf4j.Slf4j;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import static com.zt.plat.framework.common.pojo.CommonResult.success;
@Slf4j
@Tag(name = "管理后台 - 合同管理")
@RestController
@RequestMapping("/base/contract-order/contract")
@Validated
public class ContractController implements BusinessControllerMarker {
@Resource
private ContractService contractService;
@GetMapping("/page")
@Operation(summary = "获得合同分页列表")
@PreAuthorize("@ss.hasPermission('base:contract-main:query')")
public CommonResult<PageResult<ContractRespVO>> getContractPage(@Valid ContractPageReqVO pageReqVO) {
PageResult<ContractMainDO> pageResult = contractService.getContractPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, ContractRespVO.class));
}
@PostMapping("/create")
@Operation(summary = "新增合同")
@PreAuthorize("@ss.hasPermission('system:contract-main:create')")
public CommonResult<Long> createContract(@Valid @RequestBody ContractSaveReqVO reqVO) {
Long id = contractService.createContract(reqVO);
return success(id);
}
}

Some files were not shown because too many files have changed in this diff Show More