统一修改包
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.zt.plat.module.contractorder.controller.admin.contract.vo.preparaton;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 合同明细新增/修改 Request VO")
|
||||
@Data
|
||||
public class ContractDetailSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "32609")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "合同主信息主键", example = "13595")
|
||||
private Long contractMainId;
|
||||
|
||||
@Schema(description = "物料名称", example = "张三")
|
||||
private String materialName;
|
||||
|
||||
@Schema(description = "物料编码")
|
||||
private String materialNumber;
|
||||
|
||||
@Schema(description = "数量")
|
||||
private BigDecimal quantity;
|
||||
|
||||
@Schema(description = "计量单位")
|
||||
private String unit;
|
||||
|
||||
@Schema(description = "含税单价", example = "28579")
|
||||
private BigDecimal inTaxUnitPrice;
|
||||
|
||||
@Schema(description = "金属元素缩写")
|
||||
private String elementAbbreviation;
|
||||
|
||||
@Schema(description = "金属元素名称", example = "赵六")
|
||||
private String elementName;
|
||||
|
||||
@Schema(description = "金属元素编码")
|
||||
private String elementNumber;
|
||||
|
||||
// 交货计划
|
||||
private List<ContractPlanSaveReqVO> plans;
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.zt.plat.module.contractorder.controller.admin.contract.vo.preparaton;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 合同信息分页 Request VO")
|
||||
@Data
|
||||
public class ContractPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "合同名称;与ERP(HTMC)对应,校验唯一", example = "芋艿")
|
||||
private String contractName;
|
||||
|
||||
@Schema(description = "合同编号;与ERP(HTBH)对应,校验唯一")
|
||||
private String contractPaperNumber;
|
||||
|
||||
@Schema(description = "甲方公司名称", example = "王五")
|
||||
private String purchaseCompanyName;
|
||||
|
||||
@Schema(description = "乙方公司名称", example = "王五")
|
||||
private String salesCompanyName;
|
||||
|
||||
@Schema(description = "收支性质;与ERP(SZXZ)对应")
|
||||
private String direction;
|
||||
|
||||
@Schema(description = "签署日期;与ERP(HTQDRQ)对应")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] signDate;
|
||||
|
||||
@Schema(description = "本币金额;与ERP(HTBWBZJE)对应")
|
||||
private BigDecimal basicAmount;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.zt.plat.module.contractorder.controller.admin.contract.vo.preparaton;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 交货计划条款新增/修改 Request VO")
|
||||
@Data
|
||||
public class ContractPlanSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "27474")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "合同明细主键", example = "32763")
|
||||
private Long contractDetailId;
|
||||
|
||||
@Schema(description = "交货年份", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long contractDeliveryYear;
|
||||
|
||||
@Schema(description = "交货月份")
|
||||
private Long contractPlanDeliveryMonth;
|
||||
|
||||
@Schema(description = "计划交货数量", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private BigDecimal contractPlanDeliveryQuantity;
|
||||
|
||||
@Schema(description = "交货开始日期", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private LocalDateTime contractDeliveryStartDate;
|
||||
|
||||
@Schema(description = "交货结束日期", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private LocalDateTime contractDeliveryEndDate;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,29 @@
|
||||
package com.zt.plat.module.contractorder.controller.admin.contractorder;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
/**
|
||||
* ContractOrder 控制器
|
||||
*
|
||||
* @author ZT
|
||||
*/
|
||||
@Tag(name = "管理后台 - ContractOrder")
|
||||
@RestController
|
||||
@RequestMapping("/admin/contract-order/contract-order")
|
||||
public class ContractOrderController {
|
||||
|
||||
@GetMapping("/hello")
|
||||
@Operation(summary = "Hello ContractOrder")
|
||||
public CommonResult<String> hello() {
|
||||
return success("Hello, ContractOrder!");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.zt.plat.module.contractorder.dal.dataobject.contract;
|
||||
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.*;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 合同明细 DO
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@TableName("bse_ctrt_dtl")
|
||||
@KeySequence("bse_ctrt_dtl_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class ContractDetailDO extends BusinessBaseDO {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 合同主信息主键
|
||||
*/
|
||||
@TableField("CTRT_MAIN_ID")
|
||||
private Long contractMainId;
|
||||
/**
|
||||
* 物料名称
|
||||
*/
|
||||
@TableField("MTRL_NAME")
|
||||
private String materialName;
|
||||
/**
|
||||
* 物料编码
|
||||
*/
|
||||
@TableField("MTRL_NUM")
|
||||
private String materialNumber;
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
@TableField("QTY")
|
||||
private BigDecimal quantity;
|
||||
/**
|
||||
* 计量单位
|
||||
*/
|
||||
@TableField("UNT")
|
||||
private String unit;
|
||||
/**
|
||||
* 含税单价
|
||||
*/
|
||||
@TableField("IN_TAX_UPRC")
|
||||
private BigDecimal inTaxUnitPrice;
|
||||
/**
|
||||
* 金属元素缩写
|
||||
*/
|
||||
@TableField("ELEM_ABBR")
|
||||
private String elementAbbreviation;
|
||||
/**
|
||||
* 金属元素名称
|
||||
*/
|
||||
@TableField("ELEM_NAME")
|
||||
private String elementName;
|
||||
/**
|
||||
* 金属元素编码
|
||||
*/
|
||||
@TableField("ELEM_NUM")
|
||||
private String elementNumber;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user